-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestNG tests not running in parallel mode with gradle 4.5.1 if there is no parallel attribute inside the test tag #4457
Comments
@pgsung You mention Gradle 4.5.1 in the title, is this a new issue? Did it work with some previous version of Gradle? |
Thanks for reporting and the reproducible case. I've confirmed this is on Gradle's side. I'll try to fix it soon. |
@oehme should be reproducible with Gradle 4.3.1 as well so it is not really a new issue. |
Rootcause of the issue is how gradle initialize testng. Gradle always overrides values of options testNg.setParallel(options.getParallel());
testNg.setThreadCount(options.getThreadCount()); if they were not initialized in gradle file. |
TestNG tests not running in parallel mode with gradle 4.5.1 if there is no parallel attribute inside the test tag. Originally reported to TestNG issue testng-team/testng#1701, maintainer (@krmahadevan ) suggested file an issue with gradle.
Expected Behavior
Tests should run in the parallel mode with gradle 4.5.1 with testng.xml at https://github.com/pgsung/testng-bug/blob/master/src/test/resources/testng.xml
and source code at https://github.com/pgsung/testng-bug
test classes https://github.com/pgsung/testng-bug/tree/master/src/test/java/parallel/test
, thread ids should be different.
Current Behavior
Tests not running in parallel mode with gradle 4.5.1
Context
Most selenium browser tests rely on gradle TestNG runner to run parallel tests with selenium grid. The current workaround is to add parallel="classes" into test tag in textng.xml or downgrade the TestNG to 6.11.
Steps to Reproduce (for bugs)
Your Environment
https://scans.gradle.com/s/ygiuoh25qh3i4
The text was updated successfully, but these errors were encountered: