I've single test class with multiple test cases, which I would like to execute in parallel mode.
I've below setup in pom.xml
But instead of executing in parallel mode, test cases are being executed in sequence.
Please clarify what may be going wrong here ?
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Directly adding parallel configuration in maven-failsafe-plugin is not working (May be a bug.)
But we can set parallel attribute and thread count in surefire plugin configuration.
Internally maven-failsafe-plugin downloads maven-surefire-plugin plugin.
So we can explicitly provide dependency on maven-surefire-plugin having parallel configuration.
I have tested , method are getting executed in parallel.
For more know how on running testcase in parallel and more configuration parameters click here.
Working pom.