gpt4 book ai didi

java - 当使用多个 TestNG 组时,Infinitest 不会运行 @Before{Method,Class} 方法

转载 作者:行者123 更新时间:2023-11-29 09:08:40 25 4
gpt4 key购买 nike

我创建了一个示例 Eclipse 项目来演示 Infinitest跳过使用 Before{Method,Class} 注释的设置方法,参见 https://github.com/jaeckel/InfinitestSampleProject .因此,当 Infinitest 执行它们时,我的测试失败了,尽管它们在 Eclipse 的 TestNG 插件执行时有效。 this test case 可以重现该行为.

这是一个错误吗?如果是,如何修复?我快速浏览了 infinitest source,但没有透露任何关于如何修复它的信息。我创建了 an issue for this并与项目的所有者交谈。但到目前为止,没有人回到我身边。

最佳答案

Infinitest github repo 的所有者已回复您的 issue并解释说这不是产品中的错误。他写道:

If a group is excluded, no test/setup/teardown annotated with this group will run. If you want to run only 'automated' tests. Do include 'automated' group but don't exclude 'integration' group.

正如您在 github 问题中指出的那样,此建议确实解决了您的问题。关闭这个问题可能是个好主意:)

关于java - 当使用多个 TestNG 组时,Infinitest 不会运行 @Before{Method,Class} 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13518997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com