-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[💡 Feature]: Align parallel implemention with Cucumber API #11101
Comments
@nextlevelbeard can you speak a little bit about how the native parallel implementation for Cucumber differs to the WebdriverIO one? Does it support running Scenarios in parallel as well? |
@nextlevelbeard please note that the Cucumber The parallel execution mode is an interesting aspect, though. You might be interested in cucumber/cucumber-js#2156 when considering your design approach, as I highlighted there several limitations concerning parallel execution via Cucumber. There's also cucumber/cucumber-js#1711 where we talked about options for running Cucumber programmatically, as well as serenity-js/serenity-js#1308 that started some of those conversations. I'm actually wondering if in the case of Cucumber integration, it could make sense to use the Cucumber runner with its parallel capabilities, retry mechanism, reporting mechanism and so on instead of the WDIO local runner. But, to come up with some nice way of plugging WDIO into Cucumber? Maybe a custom Cucumber also has very good support from all major IDEs for running individual scenarios and features, which is something that WDIO could benefit from. Whatever you decide, I'd be happy to collaborate on that :) |
I feel inclined to close this issue since I don't see a way to support this since Cucumber spins up multiple processes to execute itself in parallel and that is just not feasible given that WebdriverIO has to orchestrate this. I am happy to discuss the feature of running multiple scenarios in within a single spec in parallel. This however has been discussed in length in #3962 and we came to the conclusion that a file based parallelism approach seems to be the best approach. That said, if there are strong opinions and interest in a higher parallelization degree, I am all open for new discussions. |
if Cucumber makes orchestrating this easier, I am happy to bring this back. |
This would indeed be a very useful feature. |
@tibioneh can you comment on why? Note that you have the option to split your scenarios in multiple feature file. Furthermore a lot of time is spend starting and stopping the browser, so we you run many small scenarios in parallel you won't be gaining much time. Can you elaborate on that? |
Is your feature request related to a problem?
Since we enabled the Cucumber API to run the tests in #11069 ( and #11067, #11065 , #11010) we are disabling the native parallel implementation for Cucumber, meaning that for each WDIO worker, we invoke
runCucumber
and create an entire Cucumber test run.That introduces many redundancies when taking advantage of many built-in features of Cucumber.
publish
, each WDIO worker indirectly publishes a Cucumber.IO report, instead of having just one per WDIO test runList of native Cucumber formatters/reporters
We should take into account that Cucumber hooks can and often do reference the
@wdio/globals
, therefore on top of importing support code we must pass this context to the workers as well, otherwise we can run into reference errors such asWe must also consider aligning the WDIO retry mechanism with the Cucumber retry mechanism.
Describe the solution you'd like.
It should just work, no redundancies should be in place.
When WDIO users specify X
maxInstances
, the Cucumber parallel optional should be enabled and a maximum of X Cucumber workers wrapped in WDIO workers should run seamlessly.Describe alternatives you've considered.
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: