Parallel Execution of Tests
See original GitHub issue👓 What did you see?
When Running Cucumber Tests with parallel strategy as fixed and parallelism set to 4. I am seeing more than 8 tests running in parallel.
✅ What did you expect to see?
I should see only 4 tests to run in parallel mode.
📦 Which tool/library version are you using?
I am using cucumber-junit-platform-engine with version 7.2.3
🔬 How could we reproduce it?
we need to enable parallel execution and set the parallel execution strategy to fixed.
cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=fixed
cucumber.execution.parallel.config.fixed.parallelism=4
Steps to reproduce the behavior:
- Install ‘7.2.3’ version of cucumber, cucumber-junit-platform-engine using the pom file
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
- Add cucumber tests
- Add the config mentioned above to junit-platform.properties file
cucumber.plugin=pretty
cucumber.glue=PATH_TO_STEP-Definitions
cucumber.filter.tags=@Smoke and not (@Ignore)
cucumber.publish.enabled=false
cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=fixed
cucumber.execution.parallel.config.fixed.parallelism=4
- run the cucumber tests using runner file
@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("features")
public class SmokeTestRunnerTest {
}
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Parallel Testing: The Essential Guide - BrowserStack
Parallel Testing is a process to leverage automation testing capabilities by allowing the execution of the same tests simultaneously in ...
Read more >TestNG Parallel Execution - How to run Selenium tests in ...
Parallel testing or parallel execution, as the name suggests, is a process of running the test case parallelly rather than one after the ......
Read more >What is Parallel Testing? Definition, Approach, Example
Parallel Testing is a software testing type in which multiple versions or subcomponents of an application are tested with same input on ......
Read more >How To Perform Parallel Test Execution In TestNG With ...
Parallel testing is an approach in which independent tests are run parallel to reduce overall test execution time.
Read more >Intro to Parallel Testing: How It Works, Benefits, & Challenges
In parallel testing, a tester runs two or more versions of software concurrently with the same input or test methods. Alternately, a single ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should probably add that to the docs.
@thomasrapadmi I think I may have found your problem somewhat by accident. If you are on Java 8, it is not possible to configure the max pool size of the fork join pool used by JUnit. So the custom strategy will not work. Consider upgrading your Java version.