How do I get Team Build to show test results and coverage for xUnit.net test suite?

旧时模样 提交于 2019-12-18 04:55:23

问题


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?


回答1:


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

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

  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).



回答2:


See also http://jonnekats.wordpress.com/2009/05/07/integrate-xunit-tests-into-your-daily-team-build/



来源:https://stackoverflow.com/questions/517560/how-do-i-get-team-build-to-show-test-results-and-coverage-for-xunit-net-test-sui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!