如何让 Team Build 显示 xUnit.net 测试套件的测试结果和覆盖率? [英] How do I get Team Build to show test results and coverage for xUnit.net test suite?

查看:20
本文介绍了如何让 Team Build 显示 xUnit.net 测试套件的测试结果和覆盖率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人成功地让 Team Build 在构建报告中显示 xUnit.net 测试结果和代码覆盖率?MSBuild 运行器正在运行测试,结果在日志文件中,但构建报告的测试结果和代码覆盖率结果区域分别显示无测试结果"和无覆盖率结果".Team Build 是否正在为 xUnit.net 运行程序导出的测试结果寻找某个位置/格式?

Has anybody had any success getting Team Build to show xUnit.net test results and code coverage in the build report? The MSBuild runner is running the tests just fine and the results are in the log file, but the test results and code coverage results areas of the build report say "No test result" and "No coverage result" respectively. Is Team Build looking for a certain location / format for the test results to be exported by the xUnit.net runner?

推荐答案

TFS/TeamBuild 肯定需要特定格式的测试结果,它们也需要专门发布到 TFS.

TFS/TeamBuild definitely requires the test results in a particular format, they also need to be specifically published to TFS as well.

我目前正在为 Gallio 测试运行器寻找这个问题,并且可以提供两个可能的选择:

I'm currently looking at this problem for the Gallio test runner, and can offer two potential options:

  1. 尝试将 xUnit 测试包装在通用测试"项目类型中VSTS 提供的 - 这是 MSTest 执行 xUnit 测试的地方跑步者.
  2. 提出一个 XSLT 转换(或类似的),可以映射xUnit 结果到 MSTest 模式(请参阅http://www.codeplex.com/nunit4teambuild 一个例子NUnit 测试的方法).
  1. Try wrapping the xUnit tests inside the 'Generic Test' project type that VSTS offers - this is where MSTest executes the xUnit test runner.
  2. Come up with an XSLT transform (or similar) that can map the xUnit results to the MSTest schema (see http://www.codeplex.com/nunit4teambuild for an example of this approach for NUnit tests).

这篇关于如何让 Team Build 显示 xUnit.net 测试套件的测试结果和覆盖率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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