package com.alibaba.ceres.catalog.biz.product.impl;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.testng.annotations.AfterClass;
public class Test4JTest {
@BeforeClass
public static void beforeClass(){
System.out.println("beforeClass");
}
@AfterClass
public static void afterClass(){
System.out.println("afterClass");
}
@Before
public void before(){
System.out.println("before");
}
@After
public void after(){
System.out.println("after");
}
@Test
public void test1(){
System.out.println("test1");
}
@Test
public void test2(){
System.out.println("test2");
}
}
package com.alibaba.ceres.catalog.biz.product.impl;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class JtesterTest {
@BeforeMethod
public void beforeMethod(){
System.out.println("beforeMethod");
}
@AfterMethod
public void afterMethod(){
System.out.println("afterMethod");
}
@BeforeClass
public void beforeClassTest(){
System.out.println("beforeClassTest");
}
@AfterClass
public void afterClassTest(){
System.out.println("AfterClass");
}
@BeforeTest
public void beforeTest(){
System.out.println("beforeTest");
}
@Test
public void test1(){
System.out.println("test1");
}
@Test
public void test2(){
System.out.println("test2");
}
@AfterTest
public void afterTest(){
System.out.println("afterTest");
}
}