使用Team Build 2010运行xUnit测试

时间:2012-09-23 19:12:00

标签: tfs continuous-integration tfs2010 tfsbuild xunit.net

我需要配置Team Build Server(TFS 2010)来运行xUnit测试以及MSTests。我发现的一些信息是下一个网址:

http://weblogs.asp.net/mehfuzh/archive/2009/08/25/configuring-team-build-using-xunit.aspx

http://msmvps.com/blogs/mehfuz/archive/2009/09/05/configuring-team-build-using-xunit-from-client-update.aspx

网上的每篇帖子都说我需要修改/配置团队构建服务器,或TeamBuildTypes目录(顺便说一句。我在团队资源管理器中没有看到它)。但我的问题是Team buid在公司网络中,我无法以我的方式配置它。

所以,我的问题:是否有能力配置团队Build 2010以持续运行xUnit测试?如何仅从客户端配置它以运行xUnit测试?

我会对此表示感谢。

1 个答案:

答案 0 :(得分:2)

这些文章讨论的是TFS 2008而非2010年。在TFS 2010中,构建技术发生了重大变化。

您要做的是自定义源控件中BuildProcessTemplates目录中存在的TFS Build工作流文件(DefaultTemplate.xaml)。

您需要添加一个InvokeProcess活动,该活动将执行相应的命令行命令来为您运行xUnit。

以下是一些可能对您有帮助的链接:

http://geekswithblogs.net/jakob/archive/2012/02/01/handling-warnings-and-errors-with-invokeprocess-in-tfs-2010-build.aspx

http://www.ewaldhofman.nl/post/2010/04/20/Customize-Team-Build-2010-e28093-Part-1-Introduction.aspx