简体   繁体   English

Azure Devops:在测试机器上找不到与源筛选条件匹配的测试程序集或未发现与测试筛选条件匹配的测试

[英]Azure Devops : No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria

I'm trying to run automated tests from test plans in Azure devops.我正在尝试从 Azure devops 中的测试计划运行自动化测试。 I've added a task in my automated test pipeline to generate artifacts.我在我的自动化测试管道中添加了一个任务来生成工件。 I've created a release of the test pipeline with the following tasks:我创建了一个包含以下任务的测试管道版本:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

The problem is that when I run my test from my test plan, I have the following error saying that there is no test assemblies:问题是当我从我的测试计划运行我的测试时,我有以下错误提示没有测试程序集:

2022-09-22T15:27:08.6879981Z ##[error]ExecutionAndPublish.Run : Microsoft.VisualStudio.TestService.VstestAdapter.TestsNotFoundException: No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria. Verify that test assemblies are present on the machine and test filter criteria is correct.
2022-09-22T15:27:08.6882575Z    at Microsoft.VisualStudio.TestService.VstestAdapter.Execution.Run(ExecutionStateContext stateModelContext, CancellationToken cancellationToken)
2022-09-22T15:27:08.6883354Z    at Microsoft.VisualStudio.TestService.VstestAdapter.ExecutionAndPublish.Run(ExecutionStateContext stateModelContext, CancellationToken cancellationToken)
2022-09-22T15:27:08.6885647Z ##[error]The slice of type 'Execution' is 'Aborted' because of the error : Microsoft.VisualStudio.TestService.VstestAdapter.TestsNotFoundException: No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria. Verify that test assemblies are present on the machine and test filter criteria is correct.

日志

Most Microsoft test Execution Engines including MSTest have a default pattern they use to discovery test Assemblies which is包括 MSTest 在内的大多数 Microsoft 测试执行引擎都有一个默认模式,它们用于发现测试程序集,即

**\$(BuildConfiguration)\*.test*.dll;-:**\obj\**

Since you are not showing the Files copied I'll have to assume that you might not have any dlls that match these patterns由于您没有显示复制的文件,我不得不假设您可能没有任何与这些模式匹配的 dll

To ovverride this behaviour you'll need to ensure you are using the version 2.x of the Test Execution Task and Update the Test Files Glob Patterns要避免此行为,您需要确保您使用的是测试执行任务的 2.x 版并更新测试文件 Glob 模式测试模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM