package com.course.testng;
import org.testng.annotations.*;
public class MyTest {
@Test
public void fun01(){
System.out.println("fun01执行...");
}
@Test
public void fun02(){
System.out.println("fun02执行...");
}
@BeforeMethod
public void beforeMethod(){
System.out.println("beforeMethod执行...");
}
@AfterMethod
public void afterMethod(){
System.out.println("afterMethod执行...");
}
@BeforeClass
public void beforeClass(){
System.out.println("beforeClass...");
}
@AfterClass
public void afterClass(){
System.out.println("afterClass...");
}
@BeforeSuite
public void beforeSuite(){
System.out.println("beforeSuite...");
}
@AfterSuite
public void afterSuite(){
System.out.println("afterSuite...");
}
}
/**
* 执行顺序
* beforeSuite
* beforeClass
* beforeMethod 用例执行前执行
* afterMethod 用例执行后执行
* afterClass
* afterSuite
*/