1 package test.testng93; 2 3 import org.testng.annotations.BeforeMethod; 4 import org.testng.annotations.Test; 5 6 7 /** 8 * This class/interface 9 */ 10 public class SingleTestTest { 11 @BeforeMethod(groups={"group1"}) 12 public void shouldRunBefore() { 13 System.out.println("Runs before"); 14 } 15 16 @Test(groups={"group1"}) 17 public void theFirstActualTest() { 18 System.out.println("The first actual test"); 19 } 20 21 @Test 22 public void theSecondActualTest() { 23 System.out.println("The second actual test"); 24 } 25 } 26