gpt4 book ai didi

azure-devops - VSTS : No Test Discoverer is Registered 中 .NET Core 1.1 的 Dotnet 测试

转载 作者:行者123 更新时间:2023-12-04 04:45:21 24 4
gpt4 key购买 nike

我将 VS 2017 与 .NET Standard 类库中的新 csproj 一起使用,尝试使用带有 dotnet test 的 MSTest 测试框架通过 .NET Core 1.1 测试项目测试该库。命令。在本地运行效果很好;当我将构建发送到持续集成时,出现错误:
No test discoverer is registered to perform discovery of test cases.
如何在 VSTS 中注册此发现者并运行我的测试?

最佳答案

这是我在 VSTS ( detailed on my blog here ) 上的构建过程

  • 添加 dotnet restore任务。
  • 然后是 dotnet build任务。
  • 添加 dotnet test带参数的任务 --no-build --logger "trx;LogFileName=tests-log.trx
  • 添加 Publish test results具有以下设置的任务

  • enter image description here
  • Test Result Format = VSTest
  • Test Result Files = **/tests-log.trx
  • Merge Test Results =(选中)
  • Control Options套装Run this task即使上一个任务失败也能运行
  • 关于azure-devops - VSTS : No Test Discoverer is Registered 中 .NET Core 1.1 的 Dotnet 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43528526/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com