Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does a TestNG Thread Count do?

So I use the thread-count in all of my xml files that run parallel tests. I have noticed some things... When I increase it I generally get better results however more space is taken up on the Selenium Grid. If I lower it to 10 or so, I get a lot of time outs and my tests fail. What exactly does the number of threads do? Is each Test class a single thread or each @Test a thread? Whats really going on in the background?

like image 398
Tree55Topz Avatar asked Jun 07 '26 01:06

Tree55Topz


1 Answers

It's the number of tests that are run at the same time. It takes up more slots in the grid because is uses one grid slot per test run. It's like saying how many cars in a fleet that you want on the highway at the same time. If you say you want them to take up three lanes, then they will take up no more than three lanes, but it will take longer to get all cars through. If you say five lanes, then they will take up no more than five lanes, but it will take less time to get all cars through.

like image 66
Keith Tyler Avatar answered Jun 08 '26 14:06

Keith Tyler