1 package test.dependent; 2 3 import org.testng.Assert; 4 import org.testng.annotations.Test; 5 6 public class MultipleDependentSampleTest { 7 8 @Test init()9 public void init() {} 10 11 @Test(dependsOnMethods = "init") fail()12 public void fail() { 13 Assert.fail(); 14 } 15 16 @Test(dependsOnMethods = "fail") skip1()17 public void skip1() {} 18 19 @Test(dependsOnMethods = "skip1") skip2()20 public void skip2() {} 21 } 22