Visual Studio测试运行程序-条件正在筛选所有测试 [英] Visual studio test runner - criteria is filtering all tests

查看:124
本文介绍了Visual Studio测试运行程序-条件正在筛选所有测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VS 2013和TFS 2013,我有4个单元测试,但是我希望TFS构建只能运行其中的一个.为此,我已将[TestCategory("bvt")]分配为方法的属性.

Using VS 2013 and TFS 2013, I have 4 unit tests but I want a TFS build to run only one of them. For this I have assigned [TestCategory("bvt")] as an attribute of the method.

我编辑构建定义,然后在添加/编辑测试运行"对话框中为"TestCategory = bvt"的测试用例过滤器:"提供一个值

I edit the build definition, and within the "Add/Edit Test Run" dialog I give a value for "Test case filter:" of "TestCategory=bvt"

添加过滤器后,将不执行任何测试.如果我删除过滤器,则使用"ReleaseTfvcTemplate.12.xaml"进行的团队构建将导致执行所有4个测试. 我曾尝试用引号等将过滤器包装起来,但无法使其正常工作-我在哪里错了?

With the filter added, no tests are executed. If I remove the filter then a team build using "ReleaseTfvcTemplate.12.xaml" result in all 4 tests being executed. I've tried wrapping the filter in quotes etc but haven't been able to get it to work - where am I going wrong?

推荐答案

我通过恢复使用旧的default.xaml而不是新的TfsDefault.xaml

I solved this by reverting back to using the old default.xaml rather the the new TfsDefault.xaml

这篇关于Visual Studio测试运行程序-条件正在筛选所有测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆