Maven Surefire Plugin – Fork Options and Parallel Test Execution
Parallel Test Execution
Basically, there are two ways in Surefire to achieve parallel test execution.
The most obvious one is by using the parallel parameter. The possible values depend on the test provider used. For JUnit 4.7 and onwards, this may be methods, classes, both, suites, suitesAndClasses, suitesAndMethods, classesAndMethods or all. As a prerequisite in JUnit tests, the JUnit runner should extend org.junit.runners.ParentRunner. If no runner is specified through the annotation @org.junit.runner.RunWith, the prerequisite is accomplished.
As of Surefire 2.16, the value "both" is deprecated but it still can be used and behaves same as classesAndMethods.
See the example pages for JUnit and TestNG for details.
Read full article from Maven Surefire Plugin – Fork Options and Parallel Test Execution
No comments:
Post a Comment