Does your machine have multiple CPU's or cores? Are your tests truly independent and thread safe? In that case you'll be able to speed up your test runs considerably by enabling multi-threaded support to the Visual Studio Test Runner.
This works in both Visual Studio as on your build server.
To get the benefits, add the following snippet to your .runsettings file:
This works in both Visual Studio as on your build server.
To get the benefits, add the following snippet to your .runsettings file:
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<!-- Add this line, default is 0, which makes it run single threaded -->
<MaxCpuCount>8</MaxCpuCount>
</RunConfiguration>
</RunSettings>
This is an all or nothing setting in Visual Studio, but in TFS Build you can specify multiple test runs, each with their own .runsettings. So for your CI build you'll be able to run all your unit tests in parallel, but then execute your integration tests serially, if needed.