在 TFS 2008 版本中运行和发布 xUnit.net 测试
我在 TFS 2008 服务器上运行团队构建。我希望它在那里运行我的 xUnit.net 测试并在构建详细信息中显示结果。
我知道我必须在 TFSBuild.proj 脚本文件中进行大量配置。我已经设法运行测试,但结果没有出现在构建中。我按照 mehfuz 的说明进行操作博客。
查看其他类似的问题,我要Jonne Kats 的帖子。不幸的是,它有点过时了。有很多解决方法可以解决 xunit 任务中缺少 ExitCode 的问题。对于 xunit 1.7,这不再是必需的。
我很难尝试设置它。有人可以告诉我一种将测试结果发布到团队构建中的方法吗?
更新:我发现我的问题实际上由很多小问题组成。让我说得更直接一些。
我正在成功运行 Xunit.Runner.MSBuild.xunit 任务。它被设置为生成带有测试报告的 XML 文件。为了在 TFS 构建详细信息中显示此报告,我需要使用 导入它MSTest.exe。但是,我必须首先将其转换为 MSTest 能够理解的格式。
有人有一个 XSLT 文件,我可以用它来将 xUnit XML 报告转换为 MSTest TRX 文件吗?
I have team build running on a TFS 2008 server. I want it to run my xUnit.net tests there and show the result in the Build details.
I know I have to do a lot of configuration in the TFSBuild.proj script file. I already managed to make the tests run, but the result does not appear in the build. I followed the instructions from mehfuz's blog.
Looking at other similar question, I got to Jonne Kats' post. Unfortunately, it's kind of obsolete. There's a lot a workaround included to overcome the lack of an ExitCode in the xunit task. With xunit 1.7, this is not required anymore.
I'm having a hard time trying to set this up. Can someone show me a way to publish the test results into the team build?
Update: I see that my question actually consists of a lot of small questions. Let me make it more direct.
I'm running an Xunit.Runner.MSBuild.xunit task successfully. It is set to generate a XML file with a test report. In order to show this report in the TFS Build Details, I need to import it using MSTest.exe. However, I must first convert it to a format that MSTest will understand.
Does anyone has a XSLT file that I could use for transforming the xUnit XML report into a MSTest TRX file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里发布了一篇非常有前途的文章:http://salvoz。 com/blog/2010/02/22/transform-xunit-to-mstest/
不幸的是,XSLT 已经被博客引擎破坏了一点,我还没有付出努力让它发挥作用吧。
A very promising article is posted here: http://salvoz.com/blog/2010/02/22/transform-xunit-to-mstest/
Unfortunately, the XSLT has been mangled a bit by the blog engine, and I haven't put in the effort to get it working yet.