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版本?你有沒有更新你的構建任務? –