VNEXt 构建中的无效测试用例过滤器

Invalid Test Case Filter in VNEXt Builds

当 运行 在 TFS 2015 上构建 VNEXT 时,构建步骤为“运行 功能测试”,我收到错误消息:

[warning]DistributedTests: Error : Invalid testcase filter '!CommitTest'. Provide correct testcase filter and try again.

因为没有关于测试用例过滤器的在线文档,我只是从我以前的 XAML 构建的 VS 2013 中复制了那些,但它不起作用

正确的做法是:

/TestCaseFilter:”TestCategory!=CommitTest”

希望对大家有帮助

如果您改用 Visual Studio 测试步骤,请在“测试筛选条件”框中输入开关 /TestCaseFilter 的值。

例如:如果您不想 运行 测试类别 CommitTest,您可以输入:

TestCategory!=CommitTest

如果您查看此错误上方的 4 或 5 行,您应该找到调用 vstest.console.exe 的行。无论您在文本框中输入什么,都将设置为 /TestCaseFilter 开关:

正在执行 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "unit.Test.dll" /TestCaseFilter:"TestCategory!=CommitTest"