【问题标题】:Azure DevOps build error running xunit test运行 xunit 测试的 Azure DevOps 生成错误
【发布时间】:2018-11-30 20:17:08
【问题描述】:

我正在使用 AzureDevops 构建我的 webapi 项目。测试成功运行,但由于以下错误而失败:

    System.IO.FileNotFoundException: Unable to find tests for 
D:\a\1\s\Api\FDA.Operational.Core.Workflow\Workflow.WebAPI.Tests\bin\Release\net
coreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll. Make sure test 
project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework 
version settings are appropriate. Rerun with /diag option to diagnose further.

有人可以帮忙吗?

谢谢

【问题讨论】:

  • 你用过什么构建代理?

标签: azure-devops xunit


【解决方案1】:

您的构建正在尝试在 xUnit 测试运行程序程序集中查找单元测试。我可以告诉你:没有。

您应该缩小构建的 Test files 设置以不包含测试运行程序,或者通过添加带有感叹号 ( !) 以及包含测试适配器的程序集名称的一部分。应该类似于此屏幕截图中的最后一个条目:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-19
    • 1970-01-01
    • 2020-01-24
    • 1970-01-01
    • 1970-01-01
    • 2021-01-05
    • 2023-02-26
    相关资源
    最近更新 更多