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?


  • Are you using a DataSource? There is a default thread limit of 10 on DataSources. – user246 Mar 24 '12 at 2:12

What type of machine are you running it on? Most likely it has nothing to do with TestNG having any type of thread limits (I couldn't find anything saying there were in fact limits) but rather your local box. Thread count limits on Windows or Linux are determined by the stack space. Explanations can be found here and here.

On Windows the default stack size is around 1MB so you can easily hit a ceiling around 2000 threads because of resource constraints - although if you are hitting a constraint at 10 threads then perhaps there is some other limit factor? Unless you're using a virtual machine or some other underpowered system?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.