cucumber / cucumber-js

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

Is there a way to run feature files in parallel #2222

Closed bodycombathuang closed 1 year ago

bodycombathuang commented 1 year ago

I am using cucumber js I have 2 feature files, each of which contains 2 scenarios (totally 2*2 scenarios)

I use yarn cucumber-js --parallel 4, then 4 scenarios are run in parallel

Is there a way to run feature files in parallel , I mean, there are 2 features files, each of which contains 2 scenarios, although I specify 4 workers to run the scenarios but only 2 workers are assigned to run tests ( 1 worker run one feature file, another worker runs seond feature file at the same time) and all scenarios in one feature file are run in sequence (not in parallel)

davidjgoss commented 1 year ago

There isn’t, reasons are essentially the same as for https://github.com/cucumber/cucumber-js/blob/main/docs/faq.md#why-arent-there-beforefeature-and-afterfeature-hooks