如何在 Teamcity 构建步骤中使用通配符路径后排除 NUnit 测试

发布于 11-15 16:18 字数 347 浏览 9 评论 0原文

我有一个用于运行所有单元测试的构建步骤,但我也想排除一些。我使用以下通配符来运行所有测试:

**/bin/debug/*测试*.dll

但是,我想排除一些具有给定名称的测试,因此我尝试在这些名称周围放置排除过滤器:

/src/TestToExclude1/bin/debug/TestToExclude1.dll /src/TestToExclude2/bin/debug/TestToExclude2.dll

不幸的是,这似乎不起作用 - 它仍然尝试运行排除的测试。有什么办法可以做到这一点吗?

I have a build step for running all of my unit tests, but I want to exclude some as well. I am using the following wildcard to run all of my tests:

**/bin/debug/*Test*.dll

However, I want to exclude some tests with given names, so I've tried putting an exclude filter around these names:

/src/TestToExclude1/bin/debug/TestToExclude1.dll
/src/TestToExclude2/bin/debug/TestToExclude2.dll

Unfortunately, this doesn't seem to work - it still tries to run the excluded tests. Is there any way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纸短情长2024-11-22 16:18:15

我发现我在排除过滤器中过于明确。不幸的是,其中一个排除的测试引用了另一个排除的测试,因此将其复制到其输出文件夹。我并不排除:

/src/FirstTestToExclude/bin/debug/SecondTestToExclude.dll

我已将过滤器更改为:

**/*SecondTestToExclude.dll

I discovered that I was being too explicit in the exclude filter. Unfortunately, one of the excluded tests references another of the excluded tests, so copied it to its output folder. I wasn't excluding:

/src/FirstTestToExclude/bin/debug/SecondTestToExclude.dll

I've changed the filter to:

**/*SecondTestToExclude.dll

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文