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):

</plugins>
    [...]
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.21.0</version>
        <configuration>
          <suiteXmlFiles>
            <file>${suite1}</file>
            <file>${suite2}</file>
            <file>${suite3}</file>
          </suiteXmlFiles>
          <properties>
            <property>
              <name>suitethreadpoolsize</name>
              <value>${threads}</value>
            </property>
          </properties>
        </configuration>
      </plugin>
    [...]
</plugins>

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 https://sqa.stackexchange.com/questions/33392/maven-testng--suites-in-different-

LEAVE A REPLY

Please enter your comment!
Please enter your name here