question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. 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>
  1. Add cucumber tests
  2. 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
  1. 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:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mpkorstanjecommented, Aug 1, 2022

Should probably add that to the docs.

0reactions
mpkorstanjecommented, Oct 14, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found