尽管通过了依赖方法,但跳过了测试.测试NG [英] tests skipped inspite the dependant method passed. TestNG
问题描述
我有许多跨课程的测试.每个类都定义为@Test,并添加与类名相同的组名[它们是 u1,u2,u3,u4,u5].在 u1 中,我有一个称为 prereqSetup() 的先决条件测试方法.这被添加到prereq"组中.现在,u1 中的所有方法都标有dependsOnMethods="prereqSetup".其余所有类都标记为dependsOnGroups="prereq".
I have a number of tests across classes. Each class is defined as @Test and group name added to it same as class name[they are u1,u2,u3,u4,u5]. In u1, I have a test method for prerequisites called prereqSetup(). This is added to the group "prereq". Now, all the methods in u1 are marked with dependsOnMethods="prereqSetup". Rest all classes are marked as dependsOnGroups="prereq".
我的先决条件方法已通过.u1 和 u3 中的几个方法运行并显示失败.但是其余的所有方法都被跳过了.除了我上面提到的之外,没有其他依赖.提供注释以供参考:
My prerequisites method has passed. Couple of methods in u1 and u3 are run and show failed. But rest all methods are skipped. There is no other dependency apart from what i have mentined above. Providing the annotations for reference:
@Test(groups="u1")
public class U1 {
//All methods are marked with @Test(dependsOnMethods="prereqSetup")
}
@Test(groups="u2",dependsOnGroups="prereq")
public class U2{
//All methods are marked with @Test
}
这是通过 u2-u5 为所有类完成的.
This is done for all classes through u2-u5.
推荐答案
我对这个问题有点不清楚,但看起来你没有一个叫做prereq"的组
I am a bit unclear on the question but it doesn't look like you have a group called "prereq"
这篇关于尽管通过了依赖方法,但跳过了测试.测试NG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!