gpt4 book ai didi

methods - 在 TestNG 中依次运行测试方法

转载 作者:行者123 更新时间:2023-12-02 15:54:21 25 4
gpt4 key购买 nike

我正在使用 Eclipse + Selenium WebDriver + TestNG

这是我的类结构:

class1
{
@test (invocation count =4)
method1()

@test (invocation count =4)
method2()

}

我的testing.xml 文件:

<classes>
<class name="tests.class1">
<methods>
<include name="method1" />
<include name="method2" />
</methods>
</class>
</classes>

当运行我当前的testing.xml时,测试的顺序是:方法1方法1方法1方法1方法2方法2方法2方法2

但我希望测试按以下顺序运行:方法1方法2方法1方法2方法1方法2方法1方法2

请指导我达到预期的结果。非常感谢。

最佳答案

documentation 中查找“dependsOnGroups” .

关于methods - 在 TestNG 中依次运行测试方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11503743/

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