Reputation: 21
i am using maven-surefire, cucumber and testng to run a few cucumber test in parallel, I would like to execute a few test in parallel and a few in serial order. PS- i am not using testng.xml but using testrunner.java to run my test.
Regards
Upvotes: 2
Views: 2199
Reputation: 1123
Please see the annotation @NotThreadSafe and the documentation https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html There is exactly this problem solved. It goes with JUnit 4 - not TestNG and JUnit5.
Upvotes: 1
Reputation: 2545
You can set-up parallel in your pom.xml
. Need add configuration with thread count and parallel (methods, class, etc.)
Example:
</plugins>
[...]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
</plugin>
[...]
</plugins>
Upvotes: 1