tfs 2010 在部分成功的构建上创建工作项
我们刚刚将 TFS2008 更新为 TFS2010。在 TFS2008 的日常构建中,我在 TFSBUILD.proj 中添加了额外的功能,以便在部分成功的构建中创建一个工作项。
因此,如果构建进展顺利,但一个或多个单元测试失败,则会创建一个工作项。
这是通过在 TFSBUILD.proj 中放置一些额外的 xml 来完成的。但升级到TFS2010后,这个功能就没有了。因为整个构建架构在 TFS2010 中发生了变化,所以我无法找到如何在... tfs2010 中执行此操作。
所以问题是:如果拨号构建部分成功,如何获取工作项。
We just updated our TFS2008 to TFS2010. On the daily builds on TFS2008 I had made an extra functionality in the TFSBUILD.proj so that on Partially Succeeded builds, a work item was created.
So if a build was going right, but one ore more unit tests did fail, a work item was created.
This was done by putting some extra xml in the TFSBUILD.proj. But after upgrading to TFS2010, this functionality was gone. And because the whole build architecture is changed in TFS2010, i cannot find out how to do this in... tfs2010.
So the question is: How to get a work item if a dialy build is partially succeeded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过一番广泛的搜索,我找到了解决方案。
我在BuildProcessTemplates中打开UpgradeTemplate.xaml,这是VS在从TFS2008升级到TFS2010期间创建的一个。
几乎在工作流程结束时,有一个 if 语句,名为: If TestStatus = Unknown
The Else 为空,我将 OpenWorkItem 活动放在那里。现在,在单元测试失败时,将创建一个工作项。
另请参阅: http://blogs.msdn.com/b/lab_management/archive/2010/02/25/creating-a-bug-on-test-failure.aspx
After some extensive searching I found the solution.
I opened the UpgradeTemplate.xaml in BuildProcessTemplates, this is the one VS had created during the upgrade from TFS2008 to TFS2010.
Almost at the end of the workflow there is an if-statement called: If TestStatus = Unknown
The Else is empty, I put there an OpenWorkItem activity. So now on an unit test failure, a work item is created.
See also: http://blogs.msdn.com/b/lab_management/archive/2010/02/25/creating-a-bug-on-test-failure.aspx
我查看了defaulttemplate.xaml,看起来您将不得不使用它来复制您当前拥有的内容,从好的方面来看,它看起来并不太难。它只是一个 xaml 文件,因此在 VS 设计器中打开,应该可以满足您的需要。
可能需要复制并在构建定义中设置模板>流程>边玩边构建流程模板:)
I've had a look through the defaulttemplate.xaml, and it looks like you're going to have to play around with that to replicate what you have currently, on the plus side it doesnt look too hard. It's just a xaml file so opens in a VS designer, should be ok for what you need.
Might want to make a copy and set the template in your build definition > process > build process template while you play :)