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:
- Try wrapping the xUnit tests inside the 'Generic Test' project type that VSTS offers - this is where MSTest executes the xUnit test runner.
- 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/