Azure DevOps Pipelines VsTest - 活动测试运行已中止。原因:在此运行中没有为任何源找到合适的测试运行时提供程序

Yod*_*rek 4 azure-devops azure-pipelines

我最近在构建以前运行且未更改的管道时遇到了这个问题。旧管道运行的所有数据日志显示,用于测试的 VsTest 版本为 2.219.0,而失败的是 2.220.0。不确定新版本中是否有任何内容导致出现问题。管道 yaml 文件的 VsTest 部分如下所示:

      - task: VSTest@2
        displayName: Run VSTests
        inputs:
          testSelector: 'testAssemblies'
          testAssemblyVer2: |
            **\*test*.dll
            !**\*TestAdapter.dll
            !**\obj\**
          searchFolder: '$(System.DefaultWorkingDirectory)'
          vsTestVersion: 'toolsInstaller'
          testRunTitle: 'run unit tests'
          platform: '$(buildPlatform)'
          configuration: '$(buildConfiguration)'
Run Code Online (Sandbox Code Playgroud)

最近有人遇到过这个吗?

我尝试将 vsTestVersion 更改为“最新”,它通过了提到的错误,但随后无法连接到 TestHost

dun*_*anp 5

您可能会在 VS test v 17.6 中遇到此错误:https://github.com/microsoft/vstest/issues/4516

解决方法 1 对我有用。