您如何在TFS的内部版本中打开代码覆盖率? [英] How do you turn on Code Coverage in Builds within TFS?

查看:53
本文介绍了您如何在TFS的内部版本中打开代码覆盖率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道在运行带有.testrunco​​nfig文件的解决方案时运行TFS时如何打开代码覆盖率。



testrunco​​nfig文件中有一个用于代码覆盖的选项,但是在运行TFS构建时,没有代码覆盖结果。



我正在使用* Tests.dll掩码运行测试,而不使用测试列表(.vsmdi)。

解决方案

您如何运行测试?您是使用.vsmdi文件,还是只是指定在* Tests.dll程序集中运行所有测试?



如果是后者,并且您正在使用TFS 2008,则您需要将以下内容添加到TFSBuild.proj文件中第一个PropertyGroup的和中。

 < RunConfigFile> ; $(SolutionRoot)\TestRunConfig.testrunco​​nfig< / RunConfigFile> 

这将构建指向您的.testrunco​​nfig,以便它可以选择执行代码覆盖说明。 / p>

I need to know how to turn on Code Coverage when running TFS builds on a solution with a .testrunconfig file.

There is an option in the testrunconfig file that is for code coverage, but when running a TFS build there is no code coverage results.

I am running my tests using the *Tests.dll mask and NOT using Test Lists (.vsmdi).

解决方案

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.

这篇关于您如何在TFS的内部版本中打开代码覆盖率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆