DevOps 管道构建 .Net Core 测试类别

时间:2021-05-12 14:15:13

标签: unit-testing azure-devops azure-pipelines azure-devops-pipelines

我们的项目中有很多测试,我们将其归类为:

 [Test]
 [Category("UnitTest")]
 public void DoSomething()
 {

我不知道如何让类别在 DevOps 上运行。在 VS Test 中,这很简单,但我们必须使用 .Net Core 测试任务:

(失败)

enter image description here

1 个答案:

答案 0 :(得分:0)

所以在我在这里搜索然后发布问题之后,我在这里找到了解决方案:

Why dotnet test project.csproj --filter category=unit fails in Azure DevOps?

--configuration $(BuildConfiguration) --filter Category=UnitTest