-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I have a horde of zombies? #126
Comments
It's a limitation of how we're using the Zombie. We start a NodeJS server on a specific port and then scenario connects to that port. If you run tests in parallel on a single machine, then attempt to start 2+ NodeJS servers on same port ends up with an error. Same would go for MinkSelenium2Driver, but there you explicitly start Selenium server yourself on 4444 port so no parallel tests can be executed on same machine. In case of Zombie it's fairly easy to overcome:
|
@aik099 for Selenium2, parallel tests can actually be executed AFAIK, because Selenium2 supports opening multiple sessions in parallel (it will open a Firefox window for each of them). @IslandUsurper what you could do is force the port used for the zombie server instead of using the default one, and using a different port for each of your test process. I don't know whether grunt-parallel-behat lets you specify per-process configuration though (it would be possible as Behat accepts being configured through an environment variable so they could implement it in the tool) |
@stof , won't this cause a problems in tests, that move mouse because there is single mouse and if 2 tests would try to click/move mouse then it can only work in single window, not 2 windows in parallel.
@stof , do we currently accept NodeJS server port override say via env variable? If not, then maybe we can and then update MinkExtension to set that env variable. |
@aik099 Behat accepts the env variable when loading its configuration. and then it configures MinkZombieDriver, which allows to choose the port: MinkZombieDriver/src/NodeJS/Server.php Line 75 in 32a4b84
It is not about making the Mink code accept an env variable. It is about configuring Behat through env variables in grunt-parallel-behat to use a different configuration per execution process (this does not seem supported)
|
this should be tried. But I think it works, because Selenium does not seem to take the control of the mouse at the OS level but only faking the mouse position inside Firefox. Otherwise you would not be able to use your computer at all during a Selenium run, and I am able to do it (except that each time a new page is opened, the webdriver-controlled Firefox window gets focus again instead of staying behind the window I'm using in parallel, making it annoying. I'm not sure it was doing it on Windows) |
Actually I can't use the computer during selenium run. For sure the |
Thanks, @stof. I'll see about opening an issue with grunt-parallel-behat. Of all of the things in my toolchain, that was one that I didn't bring this up to. |
There is a problem with having grunt-parallel-behat set the port, though. Since it just calls I think a better thing to do is have a "parallel" parameter for MinkExtension, and then each driver can decide what to do, if anything, if that flag is set. MinkZombieDriver can set up several Node servers on some predefined (configurable) ports, MinkSelenium2Driver doesn't do anything since it can connect several sessions already, and so on. |
I'm using linusnorton/grunt-parallel-behat to run up to 5 Behat tests at once, which is great for cutting down the amount of time my tests run. But once I wrote a second feature that used
@javascript
, I got the following error:I don't know if this is a limitation of zombie.js, Mink, or Behat, but I can't get away with just one
@javascript
test in my suite.The text was updated successfully, but these errors were encountered: