How do you turn on Code Coverage in Builds within TFS?

左心房为你撑大大i 提交于 2019-11-30 07:02:51

How are you running the tests? Are you using a .vsmdi file or just specifying that you run all tests in *Tests.dll assemblies?

If it is the latter and you are using TFS 2008, then you need to add the following to the and of the first PropertyGroup in your TFSBuild.proj file for the build.

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

This points the build at your .testrunconfig so it can pick up the instructions to run code coverage.

You'll need the RunConfigFile entry whether you use the .vsmdi file for Test Lists or just specify the assembly file pattern. In that .testrunconfig file you specify the assemblies you want to apply code coverage to.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!