1 package test.dependent; 2 3 4 import org.testng.annotations.Test; 5 6 @Test(groups={"group2"}, dependsOnGroups={"group1"}) 7 public class C2 { 8 shouldBeSkipped()9 public void shouldBeSkipped() { 10 // the expectation is that this test will be SKIPPED because 11 // a test in group1 failed and we have a dependsOnGroups={"group1"} 12 } 13 14 } 15