Git Product home page Git Product logo

Comments (10)

seyfer avatar seyfer commented on August 19, 2024

Issue solved.
We have some js generated and cached in some directory. Behat running under fastest couldn't access the directory. Running behat with sudo solved the issue.

bin/fastest "sudo bin/behat --profile=default {}"

from fastest.

seyfer avatar seyfer commented on August 19, 2024

Actually, still, that is not clear why fastest wasn't failing on this error?

 And I switch to the iframe "widget-preview"                                                                    # FeatureContext::iSwitchToIframe()
    And I wait for element "iframe[name=da-review-widget]" to appear                                               # FeatureContext::iWaitForElementToAppear()
      Element matching css "iframe[name=da-review-widget]" not found.

If it is not failing and running forever - it will be hell to debug.
Can I set some timeouts maybe somewhere in Behat config?

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

Maybe is JavaScript (ajax) issue?

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

Btw you can still set a timeout in the waitFor function

from fastest.

seyfer avatar seyfer commented on August 19, 2024

@DonCallisto we are using standard spin function approach as proposed in docs
http://docs.behat.org/en/v2.5/cookbook/using_spin_functions.html

I just run the suite with sudo, it still doesn't finish 2 last test. They could be any tests, as the order is random.

1	51/54	✔	23 s 365 ms	features/backend/some/1_builder.feature
1	52/54	✔	50 s 805 ms	features/backend/some/1_widget.feature

53 and 54 are running forever. no status returned.

Another issue: 1 feature from 54 failed at the beginning, but it continued running the rest. There should be a way to stop execution on the first fail.

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

I'm still not sure that's a fastest issue.
With this little code, no real examples, no way to test it, I can't help you at all.

from fastest.

seyfer avatar seyfer commented on August 19, 2024

@DonCallisto well, I'm using all standard configs, nothing special.
All configs as in fastest docs. I use provided helper for setting ENV and set ENV in GET and Cookie in FeatureContext in Behat, all works.
I use provided helper for changing DB name.
Then I have bash script to create DBs with expected names and load dump in them.
Config for Selenium and Hub with 2 nodes is standard, as in docs
https://github.com/SeleniumHQ/docker-selenium#version-2
I see all works in the console
screenshot from 2018-12-30 19-05-30

I run tests with the command
find features/backend/ -name *.feature | sort -V -r | bin/fastest "bin/behat --profile=default {}" -p ${PROCESSES_NUMBER} -o --rerun-failed -vv
where PROCESSES_NUMBER = 2, for example.
I run 2 VNC sessions for both browsers and I see all works in parallel.

But I have 2 issues now.

  1. When Behat run with fastest and faces Javascript error - it just stuck, never continues, never fail. This is not happening with normal Behat run.
  2. If I run Behat as sudo in order to fix some permissions problems (just testing)
    then env ENV_TEST_CHANNEL_READABLE is not set and nothing pass as one DB used.

Have no idea why with normal Behat run all tests are green. And paralleled - some fail with JS errors.

Can it be that if 2 processes read the same JS file at the same time - the file is locked for another process?
For example, we have in Symfony routing.js to let JS use back-end routes. It loads on all pages. And I see errors like routing.js not found, but that's not true. :)

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

Again

With this little code, no real examples, no way to test it, I can't help you at all.

I use fastest in my projects and we have javascript scenarios too, so without code - or better, without a reproducible environment - we're not be able to help you more than this.

from fastest.

DonCallisto avatar DonCallisto commented on August 19, 2024

@seyfer did you resolved this issue?

from fastest.

seyfer avatar seyfer commented on August 19, 2024

@seyfer no I decided to not use it, unfortunately.

from fastest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.