blob: 8c75a48bfb01e998aad4b8e9e66fd228b29f1f3d [file] [log] [blame]
package test.dependent;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* a will fail but b should run anyway because of alwaysRun=true
*
* Created on Nov 18, 2005
* @author cbeust
*/
public class DependentOnGroup1AlwaysRunSampleTest {
private boolean m_ok = false;
@Test(groups = { "group-a"})
public void a() {
throw new RuntimeException("Voluntary failure");
}
@Test(dependsOnGroups = {"group-a"}, alwaysRun = true)
public void b() {
m_ok = true;
}
@Test(dependsOnMethods = {"b"})
public void verify() {
Assert.assertTrue(m_ok, "method b() should have been invoked");
}
}