1 package test.v6; 2 3 import org.testng.annotations.AfterClass; 4 import org.testng.annotations.AfterMethod; 5 import org.testng.annotations.BeforeClass; 6 import org.testng.annotations.BeforeMethod; 7 import org.testng.annotations.BeforeSuite; 8 import org.testng.annotations.Test; 9 10 public class B { 11 12 @Test(dependsOnMethods = "fb1") 13 public void fb2() { 14 } 15 16 @Test(groups = "1") 17 public void fb1() {} 18 19 @Test public void fb3() {} 20 21 @BeforeMethod 22 public void beforeMethod() {} 23 24 @AfterMethod(groups = "1") 25 public void afterMethod() {} 26 27 @BeforeSuite 28 public void beforeSuite() {} 29 30 @BeforeClass 31 public void beforeClass() {} 32 33 @AfterClass 34 public void afterClass() {} 35 } 36