What is the max number of threads for tests running in parallel

5,818 views
Skip to first unread message

RatedAbstract

unread,
Mar 23, 2012, 5:21:40 PM3/23/12
to testng...@googlegroups.com

I’m trying to run TestNG tests in parallel, right now I’ve set “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are running at a time. Is this testNG’s thread limit? Is there anything we can do to increase this limit?

Thanks

Cédric Beust ♔

unread,
Mar 23, 2012, 5:47:01 PM3/23/12
to testng...@googlegroups.com
There is no TestNG thread count limit, I'm not quite sure where this limit exists but I would start by looking at the Javadoc of Executors.

-- 
Cédric




On Fri, Mar 23, 2012 at 2:21 PM, RatedAbstract <shahzada...@gmail.com> wrote:

I’m trying to run TestNG tests in parallel, right now I’ve set “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are running at a time. Is this testNG’s thread limit? Is there anything we can do to increase this limit?

Thanks

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/PufgqMNxf5cJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

RatedAbstract

unread,
Mar 23, 2012, 7:01:16 PM3/23/12
to testng...@googlegroups.com
Thanks Cédric. I'm will look into javadoc of Executors.

Also, I see that if I run tests in parallel for thread-count=35, most of my tests will fail with be skipped (configuration issue). Do you think this is because of timeout issue, even though I've specified thread timeout anywhere?

On Friday, March 23, 2012 2:47:01 PM UTC-7, Cédric Beust ♔ wrote:
There is no TestNG thread count limit, I'm not quite sure where this limit exists but I would start by looking at the Javadoc of Executors.

-- 
Cédric





I’m trying to run TestNG tests in parallel, right now I’ve set “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are running at a time. Is this testNG’s thread limit? Is there anything we can do to increase this limit?

Thanks

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/​msg/testng-users/-/​PufgqMNxf5cJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users+unsubscribe@​googlegroups.com.

Cédric Beust ♔

unread,
Mar 23, 2012, 7:48:46 PM3/23/12
to testng...@googlegroups.com
On Fri, Mar 23, 2012 at 4:01 PM, RatedAbstract <shahzada...@gmail.com> wrote:
Thanks Cédric. I'm will look into javadoc of Executors.

Also, I see that if I run tests in parallel for thread-count=35, most of my tests will fail with be skipped (configuration issue). Do you think this is because of timeout issue, even though I've specified thread timeout anywhere?

I don't know, do you have a stack trace?

-- 
Cédric

Ben Vesco

unread,
Mar 23, 2012, 8:12:37 PM3/23/12
to testng...@googlegroups.com
How many cores does the box have where you're running tests? There's a
practical limit to how many threads can actually execute at once based
on available cores. Could this be part of your problem? One way to
test is to configure for 1, 2, 4, 6, 8, threads etc. and see if you
get the expected number of executing threads up to a certain point.


On Fri, Mar 23, 2012 at 2:21 PM, RatedAbstract
<shahzada...@gmail.com> wrote:

> --
> You received this message because you are subscribed to the Google Groups
> "testng-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/testng-users/-/PufgqMNxf5cJ.
> To post to this group, send email to testng...@googlegroups.com.
> To unsubscribe from this group, send email to

> testng-users...@googlegroups.com.

Abstract

unread,
Apr 2, 2012, 8:42:26 PM4/2/12
to testng...@googlegroups.com
It has 2 cores. I've tried with 2, 4, 6, and 8 threads. It works great uptil 10 threads but once I increase the limit to more then 10 threads it still executes maximum of 10 threads in parallel.


On Friday, March 23, 2012 5:12:37 PM UTC-7, Ben Vesco wrote:
How many cores does the box have where you're running tests? There's a
practical limit to how many threads can actually execute at once based
on available cores. Could this be part of your problem? One way to
test is to configure for 1, 2, 4, 6, 8, threads etc. and see if you
get the expected number of executing threads up to a certain point.


On Fri, Mar 23, 2012 at 2:21 PM, RatedAbstract

> I’m trying to run TestNG tests in parallel, right now I’ve set
> “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are
> running at a time. Is this testNG’s thread limit? Is there anything we can
> do to increase this limit?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "testng-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/testng-users/-/PufgqMNxf5cJ.
> To post to this group, send email to testng...@googlegroups.com.
> To unsubscribe from this group, send email to

> testng-users+unsubscribe@googlegroups.com.

Bill Ross

unread,
Apr 2, 2012, 8:51:27 PM4/2/12
to testng...@googlegroups.com
If you are using DataProvider parallelism, one thing you could try is

System.setProperty("dataproviderthreadcount", "20");

before the dp launches.

Back in JDK 1.4 it looked like you could get about 50 i/o-heavy
threads going on a server CPU before bogging down.

Bill

Abstract <abstra...@gmail.com> wrote:

> > > testng-users...@googlegroups.com.


> > > For more options, visit this group at
> > > http://groups.google.com/group/testng-users?hl=en.
> >
>

> --
> You received this message because you are subscribed to the Google Groups "testng-users" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/PLh8T48Cc6sJ.


> To post to this group, send email to testng...@googlegroups.com.

> To unsubscribe from this group, send email to testng-users...@googlegroups.com.

mani kandan

unread,
Oct 27, 2012, 7:14:25 AM10/27/12
to testng...@googlegroups.com
I was able to run with thread count from 100 till 1000 with preserve-order= false. You can try that.

On Fri, Oct 26, 2012 at 1:19 AM, Eric Pabst <epa...@gmail.com> wrote:
We had the same problem and after debugging TestNG found that we had to add this to the <test> element in the TestNG XML file:
    preserve-order="false"

Eric
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/H21R0WJajeEJ.

To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.



--
ALWAYS KEEP SMILING

 FOR U EVER,
 
     G.MANIKANDAN
Reply all
Reply to author
Forward
0 new messages