nightwatch
nightwatch copied to clipboard
How to run test cases one after another in Nightwatch 2 (kindly provide CLI command)
Describe the bug
I am trying to run 16 test cases one after another ,how to do it with version nightwatch 2? When one test case completes or fails then only the second test case will start running (Kindly provide CLI command).
Also, when I am trying to running it sequentially by putting Test_workers value as false, it fails in gitlab pipeline with the error
""FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory""
Sample test
sampleTest.js
// Please add the sample test here
module.exports = {
sampleTest: function(browser) {
}
}
Run with command
$ nightwatch test/sampleTest.js --your-other-arguments-here
Verbose output
debug.log
<!-- Include the verbose output, if possible (run nightwatch with `--verbose` argument) -->
Configuration
nightwatch.json
{
"your": { "config": "here" }
}
Your Environment
Executable | Version |
---|---|
nightwatch --version |
VERSION |
npm --version |
VERSION |
yarn --version |
VERSION |
node --version |
VERSION |
Browser driver | Version |
---|---|
NAME | VERSION |
OS | Version |
---|---|
NAME | VERSION |
I'm not sure I understand this request properly. It's good automation practice to make sure that every test can run atomically.
Does a before
or a beforeAll
not give you the necessary setup that you need?
No, actually I was trying to migrate from nightwatch version 1 to 2 and Then I saw in version 2 nightwatch by default starts in parallel mode(correct me if I am wrong).I was trying to launch 16 test cases in dockerised selenium server in gitlab pipeline and everytime it is failing saying "unable to connect to selenium server " after few execution.So I decided to try run in sequential way and that is why I created this ticket.
We don't by default move people to run tests in parallel. We have never done that. Have you managed to get this working?
closing as no response given. if You have further issues please come join us on discord