Now that Visual Studio 2010 has been released for bit, consider upgrading to use the parallelTestCount attribute in the MSTest .testsettings file, as described in the How-to Guide. Running unit tests faster with a computer with multiple processors or cores .
There are several limitations, for example:
- Only simple unit tests are supported (i.e. excludes coded user interface tests and tests run in ASP.NET)
- Tests must be thread safe (all tests run in the same process)
- You cannot receive code coverage at the same time (among other data and diagnostics)
For example, using 0 to indicate automatic detection (default is 1 ):
<?xml version="1.0" encoding="UTF-8"?> <TestSettings name="Release" id="{GUID}" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <Description> These are default test settings for a local test run. </Description> <Execution parallelTestCount="0"> (...) </Execution> </TestSettings>
Several blogs have noted that you may need to close and reopen the project for Visual Studio to notice that you have added / changed this attribute. In addition, if you edit the test settings file using the graphical interface, you may have to re-add the parallelTestCount attribute.
Olivier dagenais
source share