testng-team / testng

TestNG testing framework
https://testng.org
Apache License 2.0
1.98k stars 1.02k forks source link

maven-surefire-plugin <parallel>...</parallel> from pom.xml overrides parallel from testng.xml #2651

Open DeNNyA19 opened 2 years ago

DeNNyA19 commented 2 years ago

TestNG Version

7.4.0

Expected behavior

TestNG should use paralleling type from respective xml files. We noticed that issue after migration from 6.11 where it was working correctly. According to the documentation https://testng.org/doc/documentation-main.html#parallel-running option -parallel If specified, sets the default mechanism used to determine how to use parallel threads when running tests. If not set, default mechanism is not to use parallel threads at all. This can be overridden in the suite definition.

Actual behavior

TestNG uses parallel from pom.xml maven-surefire-plugin section and don't consider parallel option from xml suites

Is the issue reproducible on runner?

Test case sample

You may found a repositoty reproducing this under https://github.com/DeNNyA19/testng_bug If you change version of testng to 6.11 tests will be paralleled by classes as expected

juherr commented 2 years ago

@Tibor17 I suppose it is an issue for you, right?

Tibor17 commented 2 years ago

We are setting parallel for the versions 6.x.x in TestNG60Configurator.java and other way in version 7.x.x. How can we know if the TestNg uses parallel? Do you have a logger? Would we see the level of parallel via The level of verbosity in TestNg?

Tibor17 commented 2 years ago

@DeNNyA19 If you build the surefire snapshot version, the parallel would work for you?

Tibor17 commented 2 years ago

I would have more spare time in the autumn and winter to finish the version M6 including this fix.