MsTest is a nice testing framework. However it can be annoying from time to time. a while ago in the past I’ve blogged about the inability of this testing framework to execute all tests in a given sln file.
Recently i had some time and I decided thats its about time that ill do something productive about this (instead of my usual complaining) and I’ve sat down to write a simple msbuild task that runs all tests in a solution.
here is an example of a build script that uses this task:
<UsingTask
TaskName="RunAllTestsInSolution"
AssemblyFile="RunAllTestsInSolution.dll" />
<PropertyGroup >
<MSTestLocation>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE</MSTestLocation>
</PropertyGroup>
<Target Name="UnitTestsWithCoverage">
<RunAllTestsInSolution
...