[英]TestNg Annotation Syntax
I started learning TestNG but i got stuck so i need little help related to syntax I have already using annotation dataProvider 我开始学习TestNG,但是遇到了麻烦,因此我几乎不需要与语法相关的帮助,而我已经在使用注释dataProvider
@Test(dataProvider="getdata")
public void testCase02(String text1,String text2){
System.out.println("I m in second testcase");
System.out.println(text1);`
System.out.println(text2);
}
But i also want to use annotation (groups="group")
so can anyone help me out for syntax to use both annotation together. 但是我也想使用注释(groups="group")
所以任何人都可以帮我语法一起使用两个注释。
To mark a test method to belong to a group, you need to do is specify the groups
attribute of the Test
要将测试方法标记为一个组,您需要指定Test
的groups
属性。
@Test(dataProvider="getdata", groups = {"groupName"})
public void testCase02(String text1,String text2) {
There is a detailed documentation from testng around it. testng周围有详细的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.