首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Team Foundation Server 2015 TestCategory不工作

Team Foundation Server 2015 TestCategory不工作
EN

Stack Overflow用户
提问于 2016-05-18 06:50:00
回答 1查看 280关注 0票数 0

TFS 2015正在调用没有"Dev“测试类别的测试。

TFS Build有一个Visual Studio Build和Visual Studio Test步骤。测试步骤在测试筛选条件中设置了TestCategory=Dev。

测试类

代码语言:javascript
运行
复制
[TestMethod]        
[TestCategory("Dev")]
public void AllOrderItems() {
    //Assertions here.....
}

记录结果

代码语言:javascript
运行
复制
2016-05-17T18:11:07.5722452Z ##[debug]Entering script VSTest.ps1
2016-05-17T18:11:07.5732446Z ##[debug]vsTestVersion = 14.0
2016-05-17T18:11:07.5732446Z ##[debug]testAssembly = **\*tests*.dll;-:**\obj\**
2016-05-17T18:11:07.5742465Z ##[debug]testFiltercriteria = TestCategory=Dev
...
2016-05-17T18:11:08.1743177Z Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\TestAgentWork\35\s\APP.Business.Tests\bin\APP.Business.Tests.dll" "C:\TestAgentWork\35\s\APP.Business.Tests\bin\Test\APP.Business.Tests.dll" "C:\TestAgentWork\35\s\APP.Models.Tests\bin\Debug\APP.Models.Tests.dll" "C:\TestAgentWork\35\s\APP.Models.Tests\bin\APP.Models.Tests.dll" "C:\TestAgentWork\35\s\APP.Models.Tests\bin\Test\APP.Models.Tests.dll" "C:\TestAgentWork\35\s\APP.Web.Tests\bin\APP.Web.Tests.dll" "C:\TestAgentWork\35\s\APP.Web.Tests\bin\Test\APP.Web.Tests.dll"  /TestCaseFilter:"TestCategory=Dev" /logger:trx
...
2016-05-17T18:11:10.6976251Z ##[error]Error Message:
2016-05-17T18:11:10.6976251Z ##[error]   Assert.IsTrue failed. 
2016-05-17T18:11:10.6986243Z ##[error]Stack Trace:
2016-05-17T18:11:10.6996235Z ##[error]   at APP.Business.Tests.BusinessLayerTests.CheckIfCertifierSignatureOnFile() in C:\TestAgentWork\35\s\APP.Business.Tests\BusinessLayerTests.cs:line 516
2016-05-17T18:11:10.6996235Z Failed   CheckIfCertifierSignatureOnFile

我还尝试了priority=1,并添加了Priority(1)作为测试方法的属性,结果相同。

TFS版本14.95.25122.0

EN

回答 1

Stack Overflow用户

发布于 2016-05-18 17:08:01

刚刚使用TFS2015 Update2进行了测试,测试过滤条件如预期工作。请确保您的TFS已升级到最新版本。

此外,错误消息"Assert.IsTrue failed“表明问题是由于您的测试方法造成的,您可以检查它们。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37287462

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档