尽管通过了依赖方法,但跳过了测试.测试NG [英] tests skipped inspite the dependant method passed. TestNG

查看:104
本文介绍了尽管通过了依赖方法,但跳过了测试.测试NG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在各个班级进行了许多测试.每个类都定义为@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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆