1package test.dependent; 2 3import static org.testng.Assert.assertTrue; 4 5import org.testng.annotations.Test; 6 7public class DependencyFixTest { 8 @Test(dependsOnMethods = "helloWorld", ignoreMissingDependencies = true) 9 public void dependentOnNonExistingMethod() { 10 assertTrue(true); 11 } 12 13 @Test(dependsOnMethods = "dependentOnNonExistingMethod") 14 public void dependentOnExistingMethod() { 15 assertTrue(true); 16 } 17 18 @Test(groups = "selfSufficient", dependsOnGroups = "nonExistingGroup", ignoreMissingDependencies = true) 19 public void dependentOnNonExistingGroup() { 20 assertTrue(true); 21 22 } 23 24} 25