July 5th, 2007

How to enable code coverage without a test list

Buck Hodges
Director of Engineering

Aaron pointed out this post by Ben Day that talks about using the RunConfigFile property with a build that runs tests without using test lists (.vsmdi files).  It all boils down to looking like the following (in Orcas, you would specify the $(OutDir) part in the TestContainer’s Include attribute, whereas you don’t in the TFS 2005 power tools TestToolsTask TestContainerInOutput element).

  <ItemGroup>

    <TestContainer Include=”$(OutDir)\HelloWorldTest.dll” />

  </ItemGroup>

  <PropertyGroup>

    <RunConfigFile>$(SolutionRoot)\CSharp\Tests\localtestrun.testrunconfig</RunConfigFile>

  </PropertyGroup>

Read Ben Day’s post, Run tests from your TFS Team Build without a test list (.vsmdi) with code coverage, for the details on setting this up with the TFS 2005 power tools task.

Author

Buck Hodges
Director of Engineering

Director of Engineering, Azure DevOps

0 comments