1

作为 VSTS 发布过程的一部分,我正在尝试运行我们的 specrun 测试的一个子集。它适用于 TestCategory=SmokeTest 的“Visual Studio 测试”步骤: Visual Studio 测试

它找到 47 个测试并执行它们。当我使用“运行功能测试”使用相同的配置时,如下所示: 运行功能测试

我得到以下输出:

2017-05-22T13:12:01.3937396Z DistributedTests: Creating run for selected test assemblies with following parameters
2017-05-22T13:12:01.3937396Z DistributedTests: SourceFilter: **\*AcceptanceTests*.dll TestCaseFilter: TestCategory=SmokeTest
2017-05-22T13:12:01.3937396Z DistributedTests: Run title: Specflow Test Run
2017-05-22T13:12:01.3937396Z DistributedTests: is automated: True
2017-05-22T13:12:01.3937396Z ##[debug]DistributedTests: Test Machines Environment Url: dta://env/_Project/_apis/32858/201705221310348402
2017-05-22T13:12:01.3937396Z DistributedTests: test settings id : 8585
2017-05-22T13:12:01.3937396Z DistributedTests: build location: C:\TestDrop\AcceptanceTests-SpecFlow
2017-05-22T13:12:01.3937396Z DistributedTests: build id: 32858
2017-05-22T13:12:01.3937396Z DistributedTests: test configuration mapping: 
2017-05-22T13:12:01.7387150Z DistributedTests: Test Run with Id 23835 Queued
2017-05-22T13:12:01.9137365Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:12:12.0518938Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:12:22.1867837Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:12:32.3244144Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:12:42.4917165Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:12:52.6228617Z DistributedTests: Test run '23835' is in 'InProgress' state.
2017-05-22T13:13:02.7562848Z DistributedTests: Test run '23835' is in 'Aborted' state.
2017-05-22T13:13:12.7604691Z ##[warning]DistributedTests: Test run is aborted. Logging details of the run logs.
2017-05-22T13:13:12.7604691Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test run is aborted. Logging details of the run logs.
2017-05-22T13:13:12.8654238Z ##[warning]DistributedTests: New test run created.
2017-05-22T13:13:12.8654238Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: New test run created.
2017-05-22T13:13:12.8654238Z Test Run queued for Project Collection Build Service (vsts).
2017-05-22T13:13:12.8654238Z 
2017-05-22T13:13:12.8654238Z ##[warning]DistributedTests: Test discovery started.
2017-05-22T13:13:12.8654238Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test discovery started.
2017-05-22T13:13:12.8654238Z ##[warning]DistributedTests: Test Run Discovery Aborted . Test run id : 23835
2017-05-22T13:13:12.8654238Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test Run Discovery Aborted . Test run id : 23835
2017-05-22T13:13:12.8654238Z ##[warning]DistributedTests: UnExpected error occured during test execution. Try again.
2017-05-22T13:13:12.8654238Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: UnExpected error occured during test execution. Try again.
2017-05-22T13:13:12.8654238Z ##[warning]DistributedTests: Error : SpecRun: discovered 101 from C:\TestDrop\AcceptanceTests-SpecFlow\.AcceptanceTests.dll
2017-05-22T13:13:12.8654238Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Error : SpecRun: discovered 101 from C:\TestDrop\AcceptanceTests-SpecFlow\.AcceptanceTests.dll

它发现了 101 个测试,而不只是标记为 SmokeTest 的测试,它甚至没有运行它们。它只是保释。我知道两个 VSTS 步骤都在使用 vstest.console.exe。我还缺少其他配置吗?

4

0 回答 0