我可以运行不属于任何组的所有 TestNG 测试(在 Maven 中)吗?

发布于 2024-10-09 10:40:56 字数 281 浏览 0 评论 0原文

或者换句话说:

如果未指定组,TestNG 中的测试是否分配给默认组?如果是,该默认组的名称是什么? (是的,我已阅读这篇文章)。

我只想为 TestNG 测试指定一个组,如果它是特殊的(集成、功能、探索性、非常慢)测试。 我想保持单元测试中没有注释。 但我希望能够仅运行单元测试,而无需为所有其他组显式设置 excludedGroups (可能会添加新组......)。

Or in alternative formulation:

Are tests in TestNG assigned to a default group if no group is specified, and if yes, what is the name of that default group? (Yes, I have read this post).

I want to only specify a group for a TestNG test if it is a special (integration, functional, exploratory, very slow) test.
I want to keep the unit tests clean of annotations.
But I want to be able to only run the unit-tests without explicitly setting excludedGroups for all the other groups (new ones might be added..).

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

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

发布评论

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

评论(1

∞觅青森が 2024-10-16 10:40:56

根据 JIRA,TESTNG-160,尝试:

exclude="*"'

According to the JIRA, TESTNG-160, try:

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