Closed surajgupta7175 closed 2 years ago
The execution unit of Cucumber is the Scenario. So you should make each scenario independent from the other scenarios. While JUnit 4 would only execute scenarios in parallel this was due to limitations of JUnit 4 rather then an intentional feature. When using JUnit 5, scenarios are executed in parallel.
@mpkorstanje How to manage testdata when one testcase is creating testdata and other is using it in same feature file. Can't this be a feature?
No. But have a look at:
https://specflow.org/challenges/chain-of-dependent-scenarios/
You may also find other suggestions on google. It's a fairly common problem that happens when test scripts are converted 1-to-1 into features. The general idea is that you try to have each scenario start from a clean slate where possible (i.e. a new user, a new account ect). This may require improving the test-ability of the system overall.
Is your feature request related to a problem? Please describe. With Version 4 Selenium and cucumber-jvm. We cannot run feature files parallely using TestNG . The same feature is available with Junit
Currently when we run 2 threads, Scenario 1 & 2 present in same feature file gets executed Problem - Scenario 2 is dependent on Scenario 1 to complete
Under maven-surefireplugin
Article used to setup - https://cucumber.io/docs/guides/parallel-execution/?sbsearch=parallel