Open egarc12 opened 1 year ago
Hi there:
Same problem here, parallelism broken from Nightwatch v3 onwards.
Looking foward to your comments.
Hi,
The issue exists for me too. I am also looking for the solution. Any solutions please.
Thanks, Venkata Pravinya
Description of the bug/issue
I am using cucumber. When I use a single environment value, the test works correctly but when I use two or more environment values to run tests in different browsers in parallel, the test fails.
Reviewing the source code of the library I found that it was disabled (In the PR https://github.com/nightwatchjs/nightwatch/pull/3755) to cucumber the following parameter "supportsConcurrency" but when I set it to true it works correctly, That's why my parallel tests work until version 2.6.21
As you can see, I do not use the "--parallel" flag and I do not use the workers mode, my strategy to execute in parallel is to use more than one environment in the "--env" flag
Is it possible that the value of "supportsConcurrency" can be changed through some parameter and not simply disabled for everyone?
Steps to reproduce
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.1.2
Node Version
20.5.0
Browser
Any
Operating System
Any
Additional Information
Below I leave some access to the lines of code that I was able to review
supportsConcurrency in v2.6.21 https://github.com/nightwatchjs/nightwatch/blob/2b8a6041573d1e31e248ea1471fcee3dcb380057/lib/runner/test-runners/cucumber.js#L209
supportsConcurrency in v3.1.3 https://github.com/nightwatchjs/nightwatch/blob/2b7c29ef40e4c01d5d0246402b9525811432cdd5/lib/runner/test-runners/cucumber.js#L216
line of code where execution fails https://github.com/nightwatchjs/nightwatch/blob/2b7c29ef40e4c01d5d0246402b9525811432cdd5/lib/runner/test-runners/cucumber.js#L234