TFS 2013 - 无代码覆盖结果 [英] TFS 2013 - No Code Coverage Results

查看:28
本文介绍了TFS 2013 - 无代码覆盖结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 TFS 2013 环境设置,我正在尝试让 TFSBuild 在构建后收集我的代码覆盖率结果.
测试运行良好,但无论我尝试什么,我都会收到一条消息,说没有代码覆盖率结果".

I have a TFS 2013 environment setup and I am trying to get TFSBuild to gather my code coverage results after a build.
The tests are running fine, but no matter what I try, I get a message saying "No Code Coverage Results".

我已经阅读了代码覆盖率分析服务",但它根本没有安装在我的服务器上,而且我似乎在任何地方都找不到它.

I have read about a "Code Coverage Analysis Service", but that is not installed on my servers at all and I can't seem to find it anywhere.

我已经完成了构建过程,以确保我将自动测试 --> 测试源 --> 运行设置 --> 运行设置类型"设置为 CodeCoverageEnabled,但无论我尝试什么其他方法,我都无法将结果发布到分析服务数据库,因此我可以运行 代码覆盖率报告.

I have gone through the process of the builds to make sure I have the "Automated Tests --> Test Source --> Run settings --> Type of run settings" set to CodeCoverageEnabled, but no matter what else I try, I can't get the results to get published to the Analysis services database so I can run the Code Coverage Reports.

我尝试了一个运行设置文件,但没有运气,所以我把它排除在外.

I have tried a run settings file, but with no luck, so I have taken that out of the equation.

任何帮助将不胜感激!

推荐答案

我刚刚发现问题是我的代码覆盖率没有在构建服务器上计算.我通过 Microsoft 的帮助台解决了这个问题,这是一个小的 UI 错误.

I just figured out what the problem was that my Code Coverage weren't been calculated on the buildserver. I figured this out with the helpdesk of Microsoft and it is a small UI bug.

重现步骤:创建一个新的构建定义.

Steps to reproduce: Create a new build definition.

  1. 转到构建定义的流程选项卡并选择要构建的解决方案文件.
  2. 现在展开自动化测试"部分并展开测试源".
  3. 展开运行设置"并将运行设置类型"从默认"更改为CodeCoverageEnabled".
  4. 保存构建定义并运行构建.
  5. 检查构建结果并注意没有计算代码覆盖率.

要解决此问题,请使用构建定义的其他 ui.

To fix this issue use the other ui of the build definition.

  1. 选择自动化测试"节点.
  2. 现在在右侧的那一行中,您将看到一个带有..."的按钮.点击它,将打开一个对话框.
  3. 点击编辑"以编辑您的测试源.您将看到代码覆盖率已启用.如果没有选择它.
  4. 再次点击 Ok 和 Ok 关闭两个对话框.
  5. 现在保存构建定义并再次运行构建.

现在可以计算代码覆盖率了!!!微软帮助台已经向开发团队提交了一个错误,我猜下一个版本会修复它.小错误,但我花了两天多的时间才找到错误!

Now the code coverage does get calculated!!! The microsoft helpdesk has submitted a bug to the development team and it will be fixed I guess the next release. Small bug but it cost me more then two days to find the bug!

这篇关于TFS 2013 - 无代码覆盖结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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