Skip to content
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

Support running environments sequentially #1901

Open
openjck opened this issue Oct 9, 2018 · 6 comments
Open

Support running environments sequentially #1901

openjck opened this issue Oct 9, 2018 · 6 comments

Comments

@openjck
Copy link

openjck commented Oct 9, 2018

This has been discussed before (#138) but I'd like to formally request the feature.

Nightwatch can run tests in multiple environments simultaneously. For example, the following command will run all tests in Firefox, Chrome, and Safari at the same time.

nightwatch --env firefox,chrome,safari

There are times when running tests sequentially is preferable: first in Firefox, then in Chrome, then in Safari. For example, the most basic BrowserStack Automate plan only allows tests to be run in one browser at a time. I'd like to request that Nightwatch support this with a --sequential flag (or similar).

@beatfactor
Copy link
Member

Yes, but you can already do this by creating a small script which does something like nightwatch --env firefox && nightwatch --env chrome.

@openjck
Copy link
Author

openjck commented Oct 12, 2018

Good point. We do something like that in ensemble.

One downside is that this approach can be pretty verbose and repetitive, especially if the --config option needs to be passed.

For example, it ends up being:

nightwatch --config nightwatch.browserstack.conf.js --env ie && nightwatch --config nightwatch.browserstack.conf.js --env edge && nightwatch --config nightwatch.browserstack.conf.js --env firefoxWin7 && nightwatch --config nightwatch.browserstack.conf.js --env firefoxSierra && nightwatch --config nightwatch.browserstack.conf.js --env chromeWin7 && nightwatch --config nightwatch.browserstack.conf.js --env chromeSierra

whereas something like this would be nice:

nightwatch --sequential --config nightwatch.browserstack.conf.js --env ie,edge,firefoxWin7,firefoxSierr,chromeWin7,chromeSierra

That can still be scripted, and that's what we do in ensemble, but a --sequential flag would be convenient.

@rikbrowning
Copy link

Would be nice to have because then the end user would get a nice summary of results at the end, compared to however many summaries displayed throughout the execution.

@beatfactor beatfactor added this to Low priority in Nightwatch v1.0/v1.1 Jan 9, 2019
@didaquis
Copy link

+1 to this funcionality!

@openjck
Copy link
Author

openjck commented Mar 7, 2019

I forgot to mention this earlier, but && doesn't work on Windows. That's why projects like npm-run-all exist.

Even then, npm-run-all requires one script for each command that should be run sequentially, so you end up needing to provide one script for each invocation of the nightwatch command, which gets really verbose. We have this problem in mozilla/ensemble.

@davidpelayo
Copy link

+1 To get this!

@beatfactor beatfactor removed this from Low priority in Nightwatch v1.0/v1.1 Aug 25, 2019
@beatfactor beatfactor added this to Needs triage in Nightwatch 1.3 via automation Aug 25, 2019
@beatfactor beatfactor moved this from Needs triage to High priority in Nightwatch 1.3 Aug 25, 2019
@beatfactor beatfactor moved this from High priority to Low priority in Nightwatch 1.3 Dec 20, 2019
@beatfactor beatfactor added this to Needs triage in Nightwatch 1.7 via automation Mar 15, 2021
@beatfactor beatfactor removed this from Low priority in Nightwatch 1.3 Mar 15, 2021
@beatfactor beatfactor removed this from Needs triage in Nightwatch 1.7 Mar 15, 2021
@beatfactor beatfactor added this to To do in Nightwatch v2 Apr 16, 2021
@harshit-bs harshit-bs self-assigned this Feb 1, 2022
harshit-bs added a commit to harshit-bs/nightwatch that referenced this issue Feb 2, 2022
@harshit-bs harshit-bs moved this from To do to In progress in Nightwatch v2 Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment