【发布时间】:2016-09-19 06:47:47
【问题描述】:
我正在按照以下链接以分布式方式运行自动化测试(所有测试都是 MSTest)。但在这种情况下,测试套件是一个非常大的集合。它有超过 4000 次测试,并且需要更多的时间来执行。因此,我所做的是添加了一个测试类别并过滤了测试。 我现在有四个类别。我们称它们为 A,B,C,D
我这里有 2 个问题。
我的第 1 期: 当我在 TFS 中应用如下附加的测试过滤条件时,
我无法运行任何测试。以下是日志消息
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.
【问题讨论】:
-
您点击了哪个链接?如果您不应用测试过滤条件,您能否通过此步骤?
-
您的测试程序集是否正确复制到构建位置?你能分享一下 testesettings 文件吗?
标签: c# tfs msbuild mstest tfsbuild