Is there any way to limit total thread count in testng?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any way to limit total thread count in testng?

kool79
I use testng to run selenium tests with parallel='classes' and thread-count=8. In addition I use parallel data-providers. When I set data-provider-thread-count to "8" I've got up to 64 threads in total. Is there any way to limit this in some way?
I use custom method filtering and tests for execution are defined externally. Data for data-providers are also supplied from external source. So I cannot predict which configuration will be started every time: either 1 test with 50+ data-rows, or 10 tests with 50+ data-rows/test or 50 non-data-driven tests. 
Selenium tests are quite slow so reducing any of parameters will cause significant increase of test duration with underloaded resources


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to limit total thread count in testng?

Todd Bradley-2
The only way I know of is to do the math yourself and set all the various thread parameters so the total doesn't exceed whatever number you want.

On Mon, Nov 27, 2017 at 2:14 PM, <[hidden email]> wrote:
I use testng to run selenium tests with parallel='classes' and thread-count=8. In addition I use parallel data-providers. When I set data-provider-thread-count to "8" I've got up to 64 threads in total. Is there any way to limit this in some way?
I use custom method filtering and tests for execution are defined externally. Data for data-providers are also supplied from external source. So I cannot predict which configuration will be started every time: either 1 test with 50+ data-rows, or 10 tests with 50+ data-rows/test or 50 non-data-driven tests. 
Selenium tests are quite slow so reducing any of parameters will cause significant increase of test duration with underloaded resources


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.