01: package test.tmp;
02:
03: import org.testng.annotations.Configuration;
04: import org.testng.annotations.Test;
05:
06: public class ParentTest {
07:
08: @Configuration(beforeTestMethod=true)
09: public void btm1() {
10: ppp("PARENT BEFORE TEST");
11: }
12:
13: @Configuration(afterTestMethod=true)
14: public void atm1() {
15: ppp("PARENT AFTER TEST");
16: }
17:
18: @Test
19: public void t1() {
20: ppp("TEST PARENT");
21: }
22:
23: private void ppp(String string) {
24: System.out.println("[Parent] " + string);
25: }
26:
27: }
|