2016-07-06 57 views
2

我有一个TFS 2015服务器需要执行我的C#代码的代码覆盖。让Team Foundation Server 2015做代码覆盖的选项

我尝试了一些东西,延长其工作是一定的,但不是在所有优化: *我安装NUnit.WithFramework,与OpenCoverReportGenerator一起,把它发布在.htm文件的神器 - 这给我看了报道,但需要大量的点击才能看到它。而且这还不是在专用字段中显示的代码覆盖率:

enter image description here

什么是需要它来显示我的代码覆盖率?我的服务器上是否需要Visual Studio Enterprise 2015?

其他任何方法都无法构建并显示我的代码覆盖率?

更新:

当运行的版本,下面的警告抛出:

2016-07-06T08:30:31.0461215Z Warning: Using Isolation mode to run the tests as diagnostic data adapters were enabled in the runsettings. Use the /inIsolation parameter to suppress this warning. 

2016-07-06T08:30:34.3147483Z Warning: Diagnostic data adapter message: Could not find diagnostic data adapter 'Code Coverage'. Make sure diagnostic data adapter is installed and try again. 

看来我需要一个诊断数据适配器,这是described here - 我会尝试申请这样看看会发生什么。

回答

2

在构建服务器上安装Visual Studio,这似乎是要返回代码覆盖结果的要求。需要

微软的Visual Studio将在下列情况下生成服务器上安装:

  • 构建任何CPP测试项目,则必须安装Visual Studio Professional或更高版本。
  • 要运行单元测试或编码的UI测试,必须安装Visual Studio Professional或更高版本。
  • 要使用的数据和诊断数据适配器:

代码覆盖率:Visual Studio的保费或更高版本。
测试影响: Visual Studio Ultimate。
IntelliTrace:Visual Studio Ultimate。

  • 要构建构建机器上的任何现代风格的应用程序:Visual Studio中 旗舰版或Visual Studio Express的为Windows 8( 构建服务器上的操作系统必须是Windows 8)。
  • 编译并用伪造的组装项目运行测试:视觉 Studio旗舰

请参阅从MSDN源链接:Run tests in your build process

+1

只要你有MSDN没有额外的许可证构建代理上需要Visual Studio。 –