Closed evertondanilo closed 1 week ago
Thanks for including the repro project @evertondanilo, that was really helpful.
I raised a PR on your repo with the fix https://github.com/evertondanilo/cucumber-parallel-issue/pull/1 - the issue was that the ts-node
transpiler was registered in your configuration file. This file is only loaded in the parent/coordinator process, but is not loaded again in the child processes that get spawned for doing parallel execution. Moving this stuff to its own file and including it via the --require-module
option makes it work consistently, as this gets done the same way on the coordinator and child processes.
I'll close this issue now, but will try to add some more explicit advice to the docs around this kind of thing.
@davidjgoss works beautifully thanks
👓 What did you see?
When I try to run in parallel I get this issue below. However, it works fine when not in parallel. Why? How to resolve this?
npx cucumber-js --parallel 2
✅ What did you expect to see?
The expectation would be for the tests to run in parallel without errors.
📦 Which tool/library version are you using?
node v22.11.0 "@cucumber/cucumber": "^9.6.0",
🔬 How could we reproduce it?
To reproduce you can see my repo: https://github.com/evertondanilo/cucumber-parallel-issue
📚 Any additional context?
No response