package com.course.testng.groups;

import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class GroupsOnMethod {

    @Test(groups = "server")
    public void test1(){
        System.out.println("这是server 1 测试.......");
    }

    @Test(groups = "server")
    public void test2(){
        System.out.println("这是server 2测试.............");
    }

    @Test
    public void test3(){
        System.out.println("这是客户端 1测试...........");
    }

    @BeforeGroups("server")
    public void Server1(){
        System.out.println("这是server测试之前执行的------------");
    }

    @AfterGroups("server")
    public void Server2(){
        System.out.println("这是server测试执行之后执行的***********");
    }
}

 

TestNG(七)组测试

 

相关文章:

  • 2021-07-29
  • 2021-09-09
  • 2021-06-03
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-11-16
  • 2021-12-04
  • 2022-12-23
  • 2021-07-14
相关资源
相似解决方案