0
TFS 2015正在调用不具有“Dev”测试类别的测试。Team Foundation Server 2015 TestCategory不工作
TFS Build有一个Visual Studio Build和Visual Studio测试步骤。测试步骤在Test Filter条件中设置了TestCategory = Dev。
测试类
[TestMethod]
[TestCategory("Dev")]
public void AllOrderItems() {
//Assertions here.....
}
日志结果
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
我还试图优先= 1,并加入[优先级(1)]作为在测试方法具有相同的结果的属性。
TFS版本14.95.25122.0
问题是,运行的测试不属于该类别的一部分。我更新了日志输出。 – Aaron
我们使用相同的TFS版本,但我无法重现您的问题。您在构建服务器上使用哪个VS版本?你有没有更新你的构建任务? –