From TestNG documentation:

5.11.1 – Parallel

This is useful if you are running several suite files (e.g. “java
org..TestNG 1.xml 2.xml”) and you want each of these
suites to be run in a separate thread. You can use the following
command line flag to specify the size of a thread pool:

java org.testng.TestNG -suitethreadpoolsize 3 testng1.xml testng2.xml testng3.xml

The corresponding ant task name is suitethreadpoolsize.

To set this up using Surefire Plugin (as shown in their examples):


Then the command line would be:

mvn clean test -Dthreads=3 -Dsuite1=<full path 1 to the suite> -Dsuite2=<full path 2 to the suite> -Dsuite3=<full path 3 to the suite>

Source link


Please enter your comment!
Please enter your name here