ackage com.coutse.testng.groups;
import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test;
public class GroupsOnMethod {
@Test(groups = "server")
public void testserver1(){
System.out.println("服务端组测试1111");
}
@Test(groups = "server")
public void testserver2(){
System.out.println("服务端组测试2222");
}
@Test(groups = "client")
public void testclient3(){
System.out.println("客户端组测试3333");
}
@Test(groups = "client")
public void testclient4(){
System.out.println("客户端组测试4444");
}
@BeforeGroups("server")
public void beforegroups(){
System.out.println("服务端组测试之前执行!");
}
@AfterGroups("server")
public void aftergroups(){
System.out.println("服务端组测试之后执行!");
}
}
Testng 分组测试--方法
最新推荐文章于 2023-03-13 12:54:37 发布