How run unit tests in parallel with testng

October 6, 2013 by
Filed under: Uncategorized 

1.To run unit test by classes parallel

 <plugin>      
  <groupId>org.apache.maven.plugins</groupId>      
  <artifactId>maven-surefire-plugin</artifactId>      
  <configuration>        
  <parallel>classes</parallel>      
    <threadCount>4</threadCount>      
  </configuration>      
 </plugin>

2.To run unit test by methods in parallel

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

 

Reference:

http://books.sonatype.com/mcookbook/reference/ch07s06.html

Digg This
Reddit This
Stumble Now!
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments

Comments are closed.