difference between thread-count and threadPoolSize ????

5,540 views
Skip to first unread message

rohit jha

unread,
Sep 8, 2015, 7:24:12 AM9/8/15
to selenium_q...@googlegroups.com, testng...@googlegroups.com
Hi All,

What is the basic difference between thread-count and threadPoolSize ???
When and Where these are used???
If possible then please explain with example...


Thanks

Krishnan Mahadevan

unread,
Sep 8, 2015, 8:49:27 AM9/8/15
to testng...@googlegroups.com
Quoting from the official TestNG Documentation : 


The threadcount attribute is normally set via the TestNG suite xml file. It basically determines the intensity of parallelism for your testng tests [ ie., how many @Test annotated test methods can TestNG run in parallel at any given point in time ]


-threadcountThe default number of threads to use when running tests in parallel.This sets the default maximum number of threads to use for running tests in parallel. It will only take effect if the parallel mode has been selected (for example, with the -parallel option). This can be overridden in the suite definition.

The threadPoolSize is an attribute of the @Test annotation. This attribute informs TestNG how many threads should testng spawn for the current @Test annotated test method. This attribute is relevant only when you use the invocationCount attribute of the @Test annotation.

threadPoolSizeThe size of the thread pool for this method. The method will be invoked from multiple threads as specified by invocationCount. 
Note: this attribute is ignored if invocationCount is not specified


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
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 testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages