-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Data Provider Threads configuration in the suite don't match the documentation #2980
Comments
After a bit of searching, it seems like this is similar / the same as #2019 |
The reason we need this solved, is that we only have a certain number of licenses for our remote selenium service. In this suite we have ~12 tests that each have 7 data provider instances in addition to another 12 basic tests. We can only run ~30 tests at a time in parallel to not utilize all our licenses. In working on the suite file, I've setup the DP tests to run first w/ 8 threads, and 4 dp-threads (So a max of 32). Then run the basic tests after. However, this is still wasting time (we want to get the 90 some-odd tests running at around 25-30 at a time to speed up the result. |
Closes testng-team#2980 We can now configure TestNG such that it uses a Suite level thread pool when running data driven Tests in parallel. This can be enabled via the configuration “-shareThreadPoolForDataProviders” with a value of “true” Alternatively one can also use the suite level attribute “share-thread-pool-for-data-providers”
No. This issue is not similar to #2019. I believe that issue talks about having a global thread pool which is going to be shared by data driven tests and non data driven tests. This issue you raised is specific to just having the data driven tests honour the thread pool value set globally. |
Closes testng-team#2980 We can now configure TestNG such that it uses a Suite level thread pool when running data driven Tests in parallel. This can be enabled via the configuration “-shareThreadPoolForDataProviders” with a value of “true” Alternatively one can also use the suite level attribute “share-thread-pool-for-data-providers”
Closes testng-team#2980 We can now configure TestNG such that it uses a Suite level thread pool when running data driven Tests in parallel. This can be enabled via the configuration “-shareThreadPoolForDataProviders” with a value of “true” Alternatively one can also use the suite level attribute “share-thread-pool-for-data-providers”
Closes testng-team#2980 We can now configure TestNG such that it uses a Suite level thread pool when running data driven Tests in parallel. This can be enabled via the configuration “-shareThreadPoolForDataProviders” with a value of “true” Alternatively one can also use the suite level attribute “share-thread-pool-for-data-providers”
Closes #2980 We can now configure TestNG such that it uses a Suite level thread pool when running data driven Tests in parallel. This can be enabled via the configuration “-shareThreadPoolForDataProviders” with a value of “true” Alternatively one can also use the suite level attribute “share-thread-pool-for-data-providers”
TestNG Version
7.8.0
Expected behavior
Data providers can run in parallel with the attribute parallel:
@dataProvider(parallel = true)
// ...
Parallel data providers running from an XML file share the same pool of threads, which has a size of 10 by default. You can modify this value in the tag of your XML file:
...
Actual behavior
TestNG seems to startup "tests" that startup the dataprovider threads, and the data provider thread count is spun up per test. So if there are 4 data-provider tests each with 10 instances, if you set the data-provider-thread-count to 10, instead of only 10 data-provider tests running in parallel, the 4 "original tests" will spin up 10 data-providers each. Setting the thread-count is how many "tests" startup the data-provider threads.
https://github.com/bennid/testng-data-provider-threads
Is the issue reproducible on runner?
Test case sample
https://github.com/bennid/testng-data-provider-threads
Contribution guidelines
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
The text was updated successfully, but these errors were encountered: