All scenarios from same feature file are running in isolation even if only one has the @isolated tag
See original GitHub issue👓 What did you see?
While executing scenarios in parallel using cucumber-junit-platform-engine and “isolated” as a global exclusive resource, it seems that all scenarios from same feature file are executed in isolation, even though only one of them has the @isolated tag
✅ What did you expect to see?
Only the scenario with the @isolated tag should run isolated. The other scenarios from same feature should run in parallel.
📦 Which tool/library version are you using?
Cucumber Java 7.4.1
🔬 How could we reproduce it?
Steps to reproduce the behavior:
1.) Set the following configuration inside junit-platform.properties
cucumber.execution.parallel.config.strategy = fixed
cucumber.execution.parallel.config.fixed.parallelism=8
cucumber.execution.exclusive-resources.isolated.read-write=org.junit.platform.engine.support.hierarchical.ExclusiveResource.GLOBAL_KEY
cucumber.junit-platform.naming-strategy=long
2.) Create two feature files having each 3 scenarios 3.) Tag the second scenario from first feature file with @isolated 3.) Run all tests
Actual: Scenarios running in the same time: Feature 2 - Scenario 1 Feature 2 - Scenario 2 Feature 2 - Scenario 3
Scenarios running in serial: Feature 1 - Scenario 1 Feature 1 - Scenario 2 (tagged with @isolated) Feature 1 - Scenario 3
You can see the following timeline report:
I must admint that I can’t say for sure if this a cucumber-junit-platform-engine issue, a Junit 5 issue or something in between.
You can reproduce the problem by running the following showcase:
git@github.com:fslev/cucumber-showcase.git
mvn clean test
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top GitHub Comments
Nah. I believe this is something that should be fixed in JUnit 5. Currently the JUnit Platform implements an assumption about one test engine (JUnit Jupiter) that does not apply to another (Cucumber).
Not much we can do here on the Cucumber side.