No code coverage result with Team Build?

October 10, 2008

 
When creating a new Team Build with the Build Wizard in TFS 2008, it may be possible that you won’t have code coverage results while you have this option enabled in your testrun configuration file. This depends on how you selected your tests to run …

  1. If you have chosen to run tests that are listed in a Test List, then there won’t be any problem : code coverage results will be available because all testrun configuration settings will be picked up in the testrun configuration file via the .vsmdi file.
  2. If you have chosen to run tests with the TestContainer option, then the testrun configuration file is not picked up because there won’t be any trace of a .vsmdi file in your build project file. You may fix this by manually adding the following line to your .proj file.

    <RunConfigFile>$(SolutionRoot)\$filename$.testrunconfig</RunConfigFile>

    This line (to be added in PropertyGroup of .proj file) will pick up the test run configuration file and will control the way tests are run.


Follow

Get every new post delivered to your Inbox.