Azure 管道 运行 NUnit 测试

Azure pipeline Running NUnit Tests

在我的 Azure 构建管道中,Azure 测试任务 运行 成功但测试尚未 运行。

In my Azure Build Pipeline, Azure Test Task runs successfully but Tests have not been run.

就像 Shayki Abramczyk 指出的那样。您应该在选项 测试文件 中指定测试 dll。默认值应该是:

**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**

查看文档 Visual Studio Test task 了解更多详细信息。

更新:

When I do that it says No test assemblies found matching the pattern: Test.dll,!***TestAdapter.dll,!\obj**

我们需要在测试 dll 文件之前构建解决方案:

希望对您有所帮助。