01: package test.simple;
02:
03: import org.testng.Reporter;
04: import org.testng.annotations.BeforeClass;
05: import org.testng.annotations.BeforeMethod;
06: import org.testng.annotations.BeforeSuite;
07: import org.testng.annotations.BeforeTest;
08: import org.testng.annotations.Test;
09:
10: public class IncludedExcludedSampleTest {
11:
12: @BeforeSuite
13: public void beforeSuite() {
14: Reporter.log("beforeSuite");
15: }
16:
17: @BeforeTest
18: public void beforeTest() {
19: Reporter.log("beforeTest");
20: }
21:
22: @BeforeClass
23: public void beforeTestClass() {
24: Reporter.log("beforeTestClass");
25: }
26:
27: @BeforeMethod
28: public void beforeTestMethod() {
29: Reporter.log("beforeTestMethod");
30: }
31:
32: @Test
33: public void test1() {
34: Reporter.log("Child.test1");
35: }
36:
37: @Test(enabled=false)
38: public void test2() {
39: Reporter.log("Child.test2");
40: }
41:
42: @Test(groups="a")
43: public void test3() {
44: Reporter.log("Child.test3");
45: }
46:
47: private void ppp(String string) {
48: System.out.println("[TestNGBug] " + string);
49: }
50: }
|