testng: Parameters threadCount and parallel doesn't work with maven
Related issues:
https://github.com/cbeust/testng/issues/419 threadCount parameter does not work with ant script
https://github.com/cbeust/testng/pull/936 Fix issue #419: parallel mode was ignored with command line
https://groups.google.com/forum/#!topic/testng-users/kRmLWw6ts0U
Version TestNG: 6.9.11-SNAPSHOT Surefire: 2.19
When I try to set parallel and threadCount via surefire plugin TestNG doesn’t accept values. Tried both:
<configuration>
<parallel>tests</parallel>
<threadCount>3</threadCount>
</configuration>
<property>
<name>tests</name>
<value>classes</value>
</property>
<property>
<name>threadCount</name>
<value>3</value>
</property>
See detailed example in attached project: TestMultithreading_v.0.2.zip
Additional info: If I set this parameters in TestSuite.xml file it works fine.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (7 by maintainers)
Commits related to this issue
- Parameters threadCount & parallel don't work with maven Closes #987 — committed to krmahadevan/testng by krmahadevan 7 years ago
These two configurations are compatible. They are applicable if and only if you do not use
<suiteXmlFiles/>in Surefire/Failsafe plugin. This means this configuration works fine if you have only ordinal tests withoutsuites.xml. If you use suites.xml then do not use this configuration and tie to configuration insuites.xmlordataproviderthreadcountandparallel, or annotations in your java code. For more information see our documentation http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html or our integration tests which is highly recommended. It’s easy to find those*IT.javafiles using testng dependency in POM: https://github.com/apache/maven-surefire/tree/master/surefire-integration-tests/src/test/resources If there is anything which needs better documentation please let me know.