如何让 TeamCity 排除 nunit 测试类别?

发布于 2024-07-22 12:43:28 字数 282 浏览 4 评论 0原文

我正在使用 TeamCity VisualStudio sln 配置来驱动我的 CI 构建。 它运行我所有的 NUnit 测试 - 这一切都很好,但我不希望 TeamCity 使用 [Category("DatabaseTests")] 属性运行我的任何测试(因为它们命中了实际的数据库)。

在要排除的类别下的 NUnit 配置中,我简单地放置了 DatabaseTests 但它不起作用。 我有什么遗漏的吗? 有没有办法让我看到 teamcity 发送给 nunit 跑步者的内容?

I am using the TeamCity VisualStudio sln configuration to drive my CI build. It runs all my NUnit tests - which is all well and great but I don't want TeamCity running any of my tests with the [Category("DatabaseTests")] attribute (since they hit an actual database).

In the NUnit configuration under categories to exclude I put simply DatabaseTests but its not working. Is there something I'm missing? Is there a way that I can see what teamcity is sending to the nunit runner?

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

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

发布评论

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

评论(1

冰雪之触 2024-07-29 12:43:28

您可以打开DEBUG模式:

为 TeamCity 类启用“DEBUG”日志级别。 为此,请编辑logs/teamcity-
(服务器|代理)-log4j.xml 文件
删除所有包含的行
评论。 在那之后,
DEBUG 消息将发送至
teamcity-*.log 文件。

确保日志的轮转时间为
默认。 当调试启用时
增加 maxBackupIndex 是有意义的
相关附加程序标签中的值
10 个甚至 20 个文件(确保有
足够的可用磁盘空间)。

...我从他们的文档中得到的。 然后你就可以看到发生了什么。

You can turn on DEBUG mode:

to enable 'DEBUG' log level for TeamCity classes. To do it, edit the logs/teamcity-
(server|agent)-log4j.xml file by
removing all the lines containing
comment. After that,
DEBUG messages will go to
teamcity-*.log files.

Make sure the logs are rotated by
default. When debug is enabled it
makes sense to increase maxBackupIndex
value in the relevant appender tag to
10 or even 20 files (ensure there is
sufficient free disk space available).

...which I got from their docs. And then you can see what is happening.

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