Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Running tests in parallel #3

Open
ericomurtez opened this issue Mar 24, 2017 · 4 comments
Open

Running tests in parallel #3

ericomurtez opened this issue Mar 24, 2017 · 4 comments

Comments

@ericomurtez
Copy link

Hi,

I am running into issues running tests in parallel. If I updated the "test_workers" param to true in the nightwatch.json and run
docker-compose run --rm nightwatch

Both sample tests I have configured to run fail immediately, without starting the tests. I have looked at the docker containers and as much logs as possible but I have found no relevant information.

I have gotten tests running in parallel outside of docker, so wondering if you have any advice on how to run tests across a number of workers within the docker container?

Thanks,
Eric

@blueimp
Copy link
Owner

blueimp commented Apr 10, 2017

Hi Eric, thanks for the report.

Not sure what the reason for the immediate failure is, might have something to do with the chromedriver interface.

That being said, the video recordings will be quite useless if multiple chrome instances are running at the same time, as they will overlap since the recording feature simply grabs the desktop display content.

To parallelise the tests, my recommendation is to start multiple chromedriver instances and run each spec with a different chromedriver as selenium server.

Repository owner deleted a comment from ravivalm Oct 5, 2017
@moneyrich
Copy link

Resurrecting this thread, if that is OK.

I am running two dockers like this from a shell script:

docker-compose run --rm nightwatch -e load1 & docker-compose run --rm nightwatch -e load2 & wait

And I am seeing confusing on the videos, but not the screenshots. Is this to be expected?

@moneyrich
Copy link

The -e nightwatch tags are to drive the different user logins and behavior.

@blueimp
Copy link
Owner

blueimp commented Jan 1, 2019

Hi @moneyrich,

the reason you see this behavior is that you start two different container instances of the test driver (NightwatchJS), but are still connecting to only one Chromedriver instance.

If you want to isolate the video recordings for the tests, I recommend using two different sets of docker-compose.yml files.

The reason that screenshots are still recorded as expected is that they are taken via the webdriver API, while the videos are fullscreen Desktop recordings via FFMPEG X11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants