01: package test.dependent;
02:
03: public class Test2 {
04:
05: /**
06: * @testng.test
07: * beforeTestClass = "true"
08: * groups="init.wt"
09: */
10: public void init1() {
11: System.out.println("* init1");
12: // assert false : "error";
13: }
14:
15: /**
16: * @testng.test
17: * beforeTestClass = "true"
18: * groups="init.wt"
19: * dependsOnMethods="init1"
20: */
21: public void init2() {
22: System.out.println("* init2");
23: }
24:
25: /**
26: * @testng.test
27: * afterTestClass = "true"
28: * groups="end.wt"
29: * dependsOnMethods="init1"
30: */
31: public void end1() {
32: System.out.println("* end1");
33: }
34:
35: /**
36: * @testng.test groups="test"
37: * dependsOnGroups="init.*"
38: */
39: public void test1() {
40: System.out.println("* test1");
41: }
42:
43: /**
44: * @testng.test groups="test"
45: * dependsOnGroups="init.*"
46: */
47: public void test2() {
48: System.out.println("* test2");
49: }
50: }
|