package myotherpackage; import org.testng.annotations.Configuration; import org.testng.annotations.Test; public class TestClassSix { @Configuration(beforeTest=true) public void beforeTest() { System.out.println("--TestClassSix.beforeTest"); } @Configuration(afterTest=true) public void afterTest() { System.out.println("--TestClassSix.afterTest"); } @Configuration(beforeTestClass=true) public void beforeTestClass() { System.out.println(" --TestClassSix.beforeTestClass"); } @Configuration(afterTestClass=true) public void afterTestClass() { System.out.println(" --TestClassSix.afterTestClass"); } @Configuration(beforeTestMethod=true) public void beforeTestMethod() { System.out.println(" --TestClassSix.beforeTestMethod"); } @Configuration(afterTestMethod=true) public void afterTestMethod() { System.out.println(" --TestClassSix.afterTestMethod"); } @Test public void testMethodOne() { System.out.println(" --TestClassSix.testMethodOne()"); } @Test public void testMethodTwo() { System.out.println(" --TestClassSix.testMethodTwo()"); } @Test public void testMethodThree() { System.out.println(" --TestClassSix.testMethodThree()"); } }