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

查看:49
本文介绍了如何获得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天全站免登陆