Running JUnit tests in Parallel with Maven

Since release 2.5, surefire supports running junit test in parallel.

Modifying your pom.xml file to enable this feature is incredibly easy. All you have to do is add the <parallel>methods</parallel>element to the surefire plugin configuration.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.5</version>
  <configuration>
    <parallel>methods</parallel>
  </configuration>
</plugin>

This blog post documents this feature and includes a simple benchmark.

 

It's only fair to share...
Share on Facebook
Facebook
Google+
Google+
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Leave a Reply