1 package test.dependent; 2 3 import org.testng.annotations.Test; 4 5 public class DepthDependencyTest { 6 7 @Test(groups = { "1"} ) 8 public void f1() { 9 throw new RuntimeException(); 10 } 11 12 @Test(groups = { "2"}, dependsOnGroups = {"1"} ) 13 public void f2() { 14 15 } 16 17 @Test(groups = { "3"}, dependsOnGroups = {"2"} ) 18 public void f3() { 19 20 } 21 } 22