VsTest发布流水线突发执行失败,提示无合适测试运行时提供者
VsTest测试流水线无改动突然执行失败
环境信息
- 流水线类型:发布
- 任务名称:VsTest - testAssemblies
- 任务版本:2.*
- 代理机器.NET版本:Microsoft .NET SDK 7.0
执行日志
2023-03-28T16:33:49.9296196Z /TestCaseFilter:"TestCategory=smoke" 2023-03-28T16:33:49.9296471Z /Settings:"C:\AzureAgent_work_temp\orbnqgrxffh.tmp.runsettings" 2023-03-28T16:33:49.9296711Z /Logger:"trx" 2023-03-28T16:33:49.9296912Z /TestAdapterPath:"C:\AzureAgent_work\r1\a" 2023-03-28T16:33:50.5559981Z 开始执行测试,请稍候... 2023-03-28T16:33:50.7195222Z 未找到适用于本次运行中任何源的测试运行时提供者。 2023-03-28T16:33:50.7196058Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.TestPlatform.AdapterUtilities.dll (.NETStandard,Version=v1.0, X64) 2023-03-28T16:33:50.7196755Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.TestPlatform.CommunicationUtilities.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7197344Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.TestPlatform.CoreUtilities.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7197923Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.TestPlatform.CrossPlatEngine.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7198478Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.TestPlatform.Utilities.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7199045Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.VisualStudio.TestPlatform.Common.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7199615Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\TechTalk.SpecFlow.MSTest.SpecFlowPlugin.dll (.NETStandard,Version=v2.0, X64) 2023-03-28T16:33:50.7200263Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll (.NETPortable,Version=v4.5,Profile=Profile259, X64) 2023-03-28T16:33:50.7200988Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll (.NETPortable,Version=v4.5,Profile=Profile259, X64) 2023-03-28T16:33:50.7201662Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.VisualStudio.TestPlatform.TestFramework.dll (.NETPortable,Version=v4.5,Profile=Profile259, X64) 2023-03-28T16:33:50.7202306Z 跳过源:C:\AzureAgent_work\r1\a_E3D-ProductTest-Marine-SmokeTest\drop\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll (.NETStandard,Version=v1.5, X64) 2023-03-28T16:33:50.7324053Z 共有80个测试文件匹配指定模式。 2023-03-28T16:33:50.7569197Z ##[error]未找到适用于本次运行中任何源的测试运行时提供者。 2023-03-28T16:33:50.7645001Z Vstest.console.exe 以退出代码1退出。 2023-03-28T16:33:50.7645350Z **************** 测试执行完成 ********************* 2023-03-28T16:33:50.7698773Z 测试结果文件: 2023-03-28T16:33:50.9908878Z 已完成TestExecution模型... 2023-03-28T16:33:51.0018728Z ##[warning]Vstest执行出错。请检查日志查看失败原因。可能存在测试失败。 2023-03-28T16:33:51.0021574Z ##[error]错误:进程'C:\AzureAgent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.215.0\Modules\DTAExecutionHost.exe'以退出代码1失败。 2023-03-28T16:33:51.0025759Z ##[error]Vstest执行出错。请检查日志查看失败原因。可能存在测试失败。 2023-03-28T16:33:51.0096225Z ##[section]正在完成:VsTest - testAssemblies
排查建议
- 核实代理机上.NET 7.0测试运行时(
Microsoft.NET.Test.Sdk)是否完整安装 - 检查VsTest任务的
TestAdapterPath配置,确认指定路径下存在对应测试框架的适配器文件 - 确认测试项目的目标框架与代理机.NET版本兼容,排查.NET Standard/.NET Portable组件的适配问题
- 尝试切换VsTest任务版本(更新或回退),排除任务版本兼容性故障
- 清理代理机工作目录缓存,重新拉取测试资源后重试
内容的提问来源于stack exchange,提问作者Aurobinda Jena
相关产品推荐
相关产品推荐

