Search code examples
visual-studiounit-testingvisual-studio-2010parallel-processing

Running unit tests on more than five cores in parallel


I've followed the instructions on Link to the letter and I can execute tests in parallel.

So far so good.

Now the problem: I can't set the parallelTestCount to zero (Auto configure) or to a value above 5. Running five parallel tests works fine but not six.

Yes I have more than five cores on my machine; I am running on an Intel i7 processor which has four cores with hyperthreading meaning I should be able to run 8 tests in parallel.

Now I'm sure there are some other logical or hard limitations and I am not expecting to be able to run on eight cores lightning-speeding eight tests through in parallel.

However it would be cool to know the reason for it not running more than five tests in parallel?


Solution

  • It seems that this is a bug in MSTest. I have stumbled upon the same problem, all tests are marked as aborted and there is a "Test run error" link in the Test Results window which if clicked yields this message: "Test run is aborting on '', number of hung tests exceeds maximum allowable '5'".

    Update: It is fixed in the Visual Studio 2010 Service Pack.