1
package test.regression.groupsordering;
4
import org.testng.Assert;
5
import org.testng.annotations.AfterGroups;
6
import org.testng.annotations.BeforeGroups;
7
import org.testng.annotations.Test;
9
public abstract class Base {
10
protected static boolean s_childAWasRun;
11
protected static boolean s_childBWasRun;
13
@BeforeGroups(value= "a", groups= "a")
14
public void setUp() throws Exception {
15
// System.out.println("class is " + getClass().getName() + " Before group ");
16
Assert.assertFalse(s_childBWasRun || s_childBWasRun, "Static field was not reset: @AfterGroup method not invoked");
19
@AfterGroups(value= "a", groups= "a")
20
public void tearDown() {
21
// System.out.println("class is " + getClass().getName() + " After group ");
22
Assert.assertTrue(s_childAWasRun, "Child A was not run");
23
Assert.assertTrue(s_childBWasRun, "Child B was not run");
24
s_childAWasRun= false;
25
s_childBWasRun= false;