【问题标题】:Azure Devops : No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteriaAzure Devops:在测试机器上未找到与源筛选条件匹配的测试程序集,或未发现与测试筛选条件匹配的测试
【发布时间】:2022-09-30 23:28:20
【问题描述】:

我正在尝试从 Azure devops 中的测试计划运行自动化测试。 我在我的自动化测试管道中添加了一个任务来生成工件。 我创建了具有以下任务的测试管道版本:

问题是,当我从测试计划运行测试时,出现以下错误,指出没有测试程序集:

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.

  • 我嵌入了构建配置的屏幕截图,因为它们很有用。请edit您的问题以纯文本形式包含错误消息。

标签: testing azure-devops continuous-integration automated-tests specflow


【解决方案1】:

包括 MSTest 在内的大多数 Microsoft 测试执行引擎都有一个默认模式,用于发现测试程序集,即

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

由于您没有显示复制的文件,我不得不假设您可能没有任何与这些模式匹配的 dll

要覆盖此行为,您需要确保您使用的是 2.x 版的测试执行任务并更新测试文件 Glob 模式

【讨论】:

    猜你喜欢
    • 2018-05-19
    • 2021-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-01
    相关资源
    最近更新 更多