2016-05-22 172 views
0

我正在按照以下鏈接以分佈式方式運行自動測試(所有測試均爲MSTest)。但在這種情況下,測試套件是一個非常大的集合。它有超過4000個測試,需要更多時間來執行。因此,我所做的是添加了一個測試類別並過濾了測試。 我現在有四個類別。讓我們打電話給他們A,B,C,D測試類別不過濾測試並運行過濾測試

我在這裏有2個問題。

我的問題沒有1: 當我申請如下附加在TFS試驗過濾標準,

enter image description here

我不能運行任何測試。下面是日誌消息

2016-05-22T06:15:13.2782759Z Executing the powershell script: C:\Users\Devadmin\Downloads\agent\tasks\RunVisualStudioTestsusingTestAgent\1.0.36\RunDistributedTests.ps1 
2016-05-22T06:15:13.7157792Z DistributedTests: Environment WinRm Protocol HTTPS. 
2016-05-22T06:15:13.7157792Z DistributedTests: Run Settings File Path : c:\BuildAgent\6\s\UITestSettings.testsettings 
2016-05-22T06:15:14.1650306Z DistributedTests: Creating run for selected test assemblies with following parameters 
2016-05-22T06:15:14.1650306Z DistributedTests: SourceFilter: **\*UITest*.dll TestCaseFilter: TestCategory=MyTests 
2016-05-22T06:15:14.1650306Z DistributedTests: Run title: TestRun Dev Build (Automation)_2314422.17 
2016-05-22T06:15:14.1650306Z DistributedTests: is automated: True 
2016-05-22T06:15:14.1650306Z DistributedTests: test settings id : 588 
2016-05-22T06:15:14.1650306Z DistributedTests: build location: C:\Users\Timothy.Alex\AppData\Local\Temp\UITest 
2016-05-22T06:15:14.1650306Z DistributedTests: build id: 1351 
2016-05-22T06:15:14.1650306Z DistributedTests: test configuration mapping: 
2016-05-22T06:15:14.3369186Z DistributedTests: Test Run with Id 1674 Queued 
2016-05-22T06:15:14.4090887Z DistributedTests: Test run '1674' is in 'InProgress' state. 
2016-05-22T06:15:24.4579403Z DistributedTests: Test run '1674' is in 'InProgress' state. 
2016-05-22T06:15:34.5147956Z DistributedTests: Test run '1674' is in 'InProgress' state. 
2016-05-22T06:15:44.5506966Z DistributedTests: Test run '1674' is in 'InProgress' state. 
2016-05-22T06:15:54.5948044Z DistributedTests: Test run '1674' is in 'InProgress' state. 
2016-05-22T06:16:04.6407774Z DistributedTests: Test run '1674' is in 'Aborted' state. 
2016-05-22T06:16:14.6563930Z ##[warning]DistributedTests: Test run is aborted. Logging details of the run logs. 
2016-05-22T06:16:15.1940716Z ##[warning]DistributedTests: New test run created. 
2016-05-22T06:16:15.1942838Z ##[warning]Test Run queued for Project Collection Build Service 
2016-05-22T06:16:15.1942838Z ##[warning]DistributedTests: Test discovery started. 
2016-05-22T06:16:15.1942838Z ##[warning]DistributedTests: Test Run Discovery Aborted . Test run id : 1674 
2016-05-22T06:16:15.1942838Z ##[warning]DistributedTests: UnExpected error occured during test execution. Try again. 
2016-05-22T06:16:15.1942838Z ##[warning]DistributedTests: Error : No tests were discovered from the specified test sources 
2016-05-22T06:16:15.1942838Z ##[warning]DistributedTests: Test run aborted. Test run id: 1674 
2016-05-22T06:16:15.2099252Z ##[error]The test run was aborted, failing the task.  
+0

你遵循哪個鏈接?如果您不應用測試過濾條件,您是否可以通過此步驟? –

+0

您的測試程序集是否正確地複製到構建位置?你可以分享testesettings文件嗎? –

回答

0

錯誤日誌表示「沒有測試從指定的測試源發現」,你需要在你的腳步「Visual Studio Test using Test Agent Task」檢查設置,並確保這一步前面帶有「 Visual Studio測試代理部署「任務。