如何在 Teamcity 构建步骤中使用通配符路径后排除 NUnit 测试
我有一个用于运行所有单元测试的构建步骤,但我也想排除一些。我使用以下通配符来运行所有测试:
**/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 技术交流群。

我发现我在排除过滤器中过于明确。不幸的是,其中一个排除的测试引用了另一个排除的测试,因此将其复制到其输出文件夹。我并不排除:
我已将过滤器更改为:
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:
I've changed the filter to: