分组这节,同样的代码,没有分组效果
来源:5-9 组测试中的方法分组测试

萍SUN
2020-01-14
package com.course.testng.groups;
import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test;
public class GroupsMethod {
@Test(groups = "server")
public void test1(){
System.out.println("这是服务端组的测试方法11111");
}
@Test(groups = "server")
public void test2(){
System.out.println("这是服务端组的测试方法2222");
}
@Test(groups = "client")
public void test3(){
System.out.println("这是客户端组的测试方法33333");
}
@Test(groups = "client")
public void test4(){
System.out.println("这是客户端组的测试方法4444");
}
@BeforeGroups("server")
public void beforeGroupsOnServer(){
System.out.println("这是服务端组运行之前运行的方法");
}
@AfterGroups("server")
public void afterGroupsOnServer(){
System.out.println("这是服务端组运行之后运行的方法!!!!!");
}
@BeforeGroups("client")
public void beforeGroupsOnClient(){
System.out.println("这是客户端组运行之前运行的方法");
}
@AfterGroups("client")
public void afterGroupsOnClient(){
System.out.println("这是客户端组运行之后运行的方法!!!!!");
}
}
2回答
-
慕移动7412903
2020-03-08
请问下怎么改版本配置,谢谢
012020-03-09 -
萍SUN
提问者
2020-01-16
pom.xml文件里改了版本配置
032021-03-08
相似问题