cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.02k stars 1.09k forks source link

Nightwatch.js + Cucumber.js parallel run issue #2323

Closed kreuka closed 11 months ago

kreuka commented 11 months ago

šŸ‘“ What did you see?

I'm able to run my tests without the --parallel 2 option But when I add the --parallel 2 option, I see the error related to the global.config object

āœ… What did you expect to see?

I'm able to run my tests with the --parallel 2 option

šŸ“¦ Which tool/library version are you using?

Command to run: npx nightwatch --tags "@myTest" --parallel 2 Nightwatch.js Version: 3.1.2 Node Version: 14.21.3

šŸ”¬ How could we reproduce it?

I think you can easily reproduce it using https://github.com/kreuka/nightwatch.js-issue

Steps to reproduce

  1. Clone the repo https://github.com/kreuka/nightwatch.js-issue
  2. Run npx nightwatch --tags "@myTest" -> tests should run not in parallel
  3. Run npx nightwatch --tags "@myTest" --parallel 2 -> tests should run in parallel. But I see the error: VError: Unexpected error on worker.receiveMessage: a BeforeAll hook errored on worker 0, process exiting: config\helpers\hooks\hooks.js:5: Cannot set property 'driverRestarted' of undefined

Opened the same issue for nightwatch.js repo: https://github.com/nightwatchjs/nightwatch/issues/3861

davidjgoss commented 11 months ago

Noting that the Nightwatch issue was closed with a fix suggestion, so also closing this issue.