简体   繁体   English

从TFS2010运行xUnit测试

[英]Run xUnit tests from TFS2010

I'm trying to work out how to run xUnit tests from TFS 2010. 我正在尝试研究如何从TFS 2010运行xUnit测试。

I found some articles on how to achieve that with the older version ( http://jonnekats.wordpress.com/2009/05/07/integrate-xunit-tests-into-your-daily-team-build/ , http://weblogs.asp.net/mehfuzh/archive/2009/08/25/configuring-team-build-using-xunit.aspx ). 我发现如何实现与旧版本(一些文章http://jonnekats.wordpress.com/2009/05/07/integrate-xunit-tests-into-your-daily-team-build/HTTP:/ /weblogs.asp.net/mehfuzh/archive/2009/08/25/configuring-team-build-using-xunit.aspx )。 These approaches don't work anymore with TFS 2010 because builds are no longer MSBuild files but instead are Workflows with different tasks. 这些方法不再适用于TFS 2010,因为构建不再是MSBuild文件,而是具有不同任务的工作流。

What I would like to achieve is something similar to what I've got on my dev machine: - build everything - run the .xunit project file - check the results 我想要实现的是类似于我的开发机器上的内容: - 构建所有内容 - 运行.xunit项目文件 - 检查结果

All that I can see on the web are custom build steps which I can't/won't use because I'll have to configure them for each single unit test assembly and they'll probably get completely messed up in TFS. 我在Web上看到的所有内容都是自定义构建步骤,我不能/不会使用它,因为我必须为每个单元测试程序集配置它们,它们可能会在TFS中完全混乱。

Any input would be appreciated. 任何输入将不胜感激。

Why dont use "InvokeProcess" in TFS Build workflow and invoke xUnit command line interface with the necessary xUnit project files as parameters? 为什么不在TFS Build工作流中使用“InvokeProcess”并使用必要的xUnit项目文件作为参数调用xUnit命令行界面?

You can capture the output of the command line by setting InvokeProcess->stdout to write a build message. 您可以通过设置InvokeProcess-> stdout来编写构建消息来捕获命令行的输出。

Take a look at the xUnit work item Support VSTS Test Runner on codeplex . 在codeplex上查看xUnit工作项支持VSTS Test Runner You can find there a VS2010 extension in Beta version. 你可以在Beta版本中找到VS2010扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM