How do we run parallel in cucumber?

Is there any way to run cucumber scenariou parallel in JUnit and testNG?

1 Like

Yes, you can run Cucumber scenario in parallel using TestNG. For details into how, refer this detailed blog:

Hey, Here multiple ways to run the parallel test via cucumber like Using TestNG ,JUnit and CLI.

Way to JUnit-

Using only Maven Surefire Plugin

Using Cucumber JVM parallel plugin

link - https://mvnrepository.com/artifact/com.github.temyers/cucumber-jvm-parallel-plugin/5.0.0

For more Details -Parallel Execution - Cucumber Documentation

Way to TestNG-

In your test project set the attribute parallel=true to the @DataProvider annotated method. Since the default dataprovider-thread-count from TestNG is 5 and now that you have instructed TestNG to run features in parallel.