0

So, I am using SpecRun to run my tests in parallel.

In SpecRun, you have the property 'testThreadCount' which allows you to specify the number of threads.

But having looked at the Specflow documentation (along with everywhere else), I am not sure what the maximum is? [edit]

Code Rocker
  • 500
  • 4
  • 15

1 Answers1

0

There is no maximum check, but depending on the test isolation mode, higher numbers make the overall test runtime worse.

For Process test thread isolation I suggest you use (Number of Cores) - 1 as test thread count.

For AppDomain and SharedAppDomain (since 1.4-rc002) you can use higher numbers.

Andreas Willich
  • 5,665
  • 3
  • 15
  • 22
  • Thanks for your reply! Could you please tell me why would having extra threads would make the overall test run-time worse? Surely, it would be a good thing - since the tests will finish running faster, as you have more threads for them to run on? – Code Rocker Mar 27 '16 at 13:50
  • If you have to many test threads, they are fighting each other for cpu time. This costs more runtime than the additional threads are saving. – Andreas Willich Mar 28 '16 at 08:54
  • What does "higher numbers" really mean for shared app domain? 10? 100? 1000? – Chris Danna Oct 08 '21 at 14:55
  • You have to experiment if a too high number of threads is then slower than a lower number. There is some overhead for thread creation that isn't compensated by the gain of parallel execution. – Andreas Willich Oct 08 '21 at 15:00