TFS 2017中的测试构建步骤似乎未运行

时间:2017-11-03 12:19:04

标签: tfs tfsbuild

我一直在TFS 2017中设置构建配置。

作为构建配置的一部分,我有测试步骤。

当构建运行时,测试步骤似乎没有错误地运行。

我在设置为失败的测试中提交了一些代码,以确保TFS在事件测试失败时停止了构建。我排队了一个新的构建,然后令人惊讶的是构建完成没有问题。

我在完整的框架库上遇到了这个问题,这些库被打包到NuGet包中,并且还有.net核心项目。

在评估测试步骤的日志时,我看到以下消息。

这些来自.Net Core构建

构建日志 enter image description here

核心项目的构建步骤 enter image description here

这些来自完整的框架构建配置

完整框架的构建日志

 ##[section]Starting: Test Assemblies **\*test*.dll;-:**\obj\**
 ==============================================================================
 Task         : Visual Studio Test
 Description  : Run tests with Visual Studio test runner
 Version      : 1.0.85
 Author       : Microsoft Corporation
 Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=624539)
 ==============================================================================
 Preparing task execution handler.
 Executing the powershell script: c:\agent\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.85\VSTest.ps1
 Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'

 Exists.

 Adding Visual Studio setup helpers.

 Getting Visual Studio setup instances.

 Found 2 instances.




 Description   : Supports running automated tests and load tests remotely
 DisplayName   : Visual Studio Test Agent 2017
 Id            : 0f053fb9
 InstallDate   : System.Runtime.InteropServices.ComTypes.FILETIME
 Name          : VisualStudio/15.2.0+26430.6
 Path          : C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent
 Version       : 15.0.26430.6
 VersionString : 15.0.26430.6

 Description   : Microsoft DevOps solution for productivity and coordination 
                 across teams of any size
 DisplayName   : Visual Studio Enterprise 2017
 Id            : e4f83d45
 InstallDate   : System.Runtime.InteropServices.ComTypes.FILETIME
 Name          : VisualStudio/15.4.0+27004.2002
 Path          : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
 Version       : 15.4.27004.2002
 VersionString : 15.4.27004.2002


 Testing leaf: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'

 Exists.

 Working folder: c:\agent\_work\11\s
 Executing C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "c:\agent\_work\11\s\*******.EDI\*******.EDI.Tests\bin\Release\*******.EDI.Tests.dll" "c:\agent\_work\11\s\*******.EDI\*******.EDI\packages\FluentAssertions.4.19.4\lib\sl5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\netstandard1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"  /EnableCodeCoverage /logger:trx /TestAdapterPath:"c:\agent\_work\11\s"
 Microsoft (R) Test Execution Command Line Tool Version 15.0.26228.0
 Copyright (c) Microsoft Corporation.  All rights reserved.

 Starting test execution, please wait...
 Warning: Using Isolation mode to run the tests as diagnostic data adapters were enabled in the runsettings. Use the /inIsolation parameter to suppress this warning.
 Warning: Unable to load types from the test source 'c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.

 Warning: Input string was not in a correct format.

 Warning: Input string was not in a correct format.

 Warning: Input string was not in a correct format.

 Warning: Input string was not in a correct format.

 Warning: Input string was not in a correct format.

 Warning: Unable to load types from the test source 'c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.

 Warning: No test is available in c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\netstandard1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.EDI\*******.EDI.Tests\bin\Release\*******.EDI.Tests.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.EDI\*******.EDI\packages\FluentAssertions.4.19.4\lib\sl5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.


 Attachments:
   c:\agent\_work\11\s\TestResults\e806ae8a-20fe-40d7-956e-90b827a56c83\Dwainwright_ASSODOPDV01 2017-10-23 15_39_33.coverage

 Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true



 ##[warning]No results found to publish.
 ##[section]Finishing: Test Assemblies **\*test*.dll;-:**\obj\**

完整框架的构建步骤

enter image description here

如何设置TFS以便实际运行测试,更重要的是,如果任何测试失败,构建将停止。

更多信息:

我也在构建服务器上安装了VS 2017.

测试是用NUnit编写的。不确定是否还有其他东西需要添加到构建服务器。几乎看起来好像构建服务器正在尝试使用MSTest;我看到一些对MSTestAdapter的引用

1 个答案:

答案 0 :(得分:1)

VSTest任务无法运行.NET核心测试,因为它使用测试平台版本1.要运行.NET核心测试,我们建议将.NET核心任务与测试命令一起使用。

参考https://github.com/Microsoft/vsts-tasks/issues/5066

作为一项工作,您可以从文件夹vstest.console.exe手动调用C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\并提供/Framework:FrameworkCore10

C:\Program Files (x86)>dir vstest.console.exe /s
 Volume in drive C is Windows
 Volume Serial Number is 0835-B24B

 Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Com
mon7\IDE\CommonExtensions\Microsoft\TestWindow

10/24/2017  02:55 PM           137,824 vstest.console.exe
               1 File(s)        137,824 bytes

 Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Com
mon7\IDE\Extensions\TestPlatform

09/04/2017  12:09 PM           133,240 vstest.console.exe
               1 File(s)        133,240 bytes

参考https://github.com/Microsoft/vstest/issues/579#issuecomment-339263411

<强>更新

确保您没有失踪和依赖。

检查packages.config,它应该类似如下:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net452" />
  <package id="MSTest.TestFramework" version="1.1.11" targetFramework="net452" />
</packages>