1 package test.v6; 2 3 import org.testng.annotations.AfterClass; 4 import org.testng.annotations.AfterGroups; 5 import org.testng.annotations.AfterMethod; 6 import org.testng.annotations.AfterSuite; 7 import org.testng.annotations.BeforeClass; 8 import org.testng.annotations.BeforeGroups; 9 import org.testng.annotations.BeforeMethod; 10 import org.testng.annotations.BeforeSuite; 11 import org.testng.annotations.Test; 12 13 public class A { 14 15 @Test(dependsOnMethods = "fa1") 16 public void fa2() { 17 } 18 19 @Test(groups = "1") 20 public void fa1() {} 21 22 @Test public void fa3() {} 23 24 @BeforeGroups("1") 25 public void beforeGroups() {} 26 27 @AfterGroups("1") 28 public void afterGroups() {} 29 30 @BeforeMethod 31 public void beforeMethod() {} 32 33 @AfterMethod 34 public void afterMethod() {} 35 36 @BeforeSuite 37 public void beforeSuite() {} 38 39 @AfterSuite 40 public void afterSuite() {} 41 42 @BeforeClass 43 public void beforeClass() {} 44 45 @AfterClass 46 public void afterClass() {} 47 } 48