Parameters threadCount and parallel doesn't work with maven
See original GitHub issueRelated 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.
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
Maven Surefire Plugin – Fork Options and Parallel Test ...
The parameters useUnlimitedThreads and threadCount are to be interpreted in the context of the value specified for the parallel parameter.
Read more >maven - surefire-plugin does not respect threadCount parameter
I've split the test execution in two parts. The first one should run the tests that can be parallelize. The second part should...
Read more >Using command line arguments to maven to set parallel and ...
I'd like to be able to set the parallel and thread-count attributes values from commandline so I can control these values at the...
Read more >Surefire parallel tests - Rafaela Azevedo
The parameter forkCount defines the maximum number of JVM processes that Surefire will spawn concurrently to execute the tests. It supports the same...
Read more >Running JUnit Tests in Parallel with Maven - Baeldung
A quick tutorial to running parallel tests using JUnit and Maven, ... However, even tests that don't declare an explicit test runner work, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.xml
ordataproviderthreadcount
andparallel
, 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.java
files 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.@juherr - My bad for jumping the gun there ! I have identified the problem. Will send in a PR soon.