.net-core - 如何忽略构建中的测试项目?

标签 .net-core azure-devops

我有一些集成测试,我不想通过 Azure DevOps 中的 .NET Core Test 命令运行。我怎样才能过滤掉它们?

我尝试设置一个特定项目来使用 Parameters.TestProjects 变量进行测试,但没有效果。

最佳答案

如果我正确地回答了你的问题,那么答案是:

添加“!”在测试组件之前进行标记,如下所示:

**\*integrationtests.dll
!**\*TestAdapter.dll
!**\obj\**

因此,将包含integrationtests.dll,并排除其他两行。

enter image description here

关于.net-core - 如何忽略构建中的测试项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53603285/

相关文章:

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

azure-devops - 创建一个自动 PR 并完成它 Azure DevOps

azure - 在 Azure DevOps 上运行 DockerFile 构建命令时找不到项目

c# - .NET Core/EF Core 2.0 升级后急切加载 "No coercion operator is defined between types"

azure-devops - App serverice 部署从 vsts 失败 4294967295

python - 通过 Azure DevOps Python API 创建 VSTS PBI

continuous-integration - 带有持续集成/构建的 AppOffline 规则问题

azure - 我的 Azure Web 应用程序无法从正确的 appsetting.{env}.json 文件中读取参数

c# .net core linq toEntity异步调用终止程序

c# - 为什么在 .NET 生态系统的标准事件模式中没有将 TEventArgs 设为逆变?