01: package test.tmp;
02:
03: import org.testng.annotations.Configuration;
04:
05: public class TestFixture {
06:
07: public static int globalCallSequence = 0;
08:
09: public static int printGlobalCallSequence(String methodName) {
10: globalCallSequence++;
11: System.err.println("*** " + methodName
12: + ": globalCallSequence=" + globalCallSequence);
13: return globalCallSequence;
14: }
15:
16: public int fixtureBeforeTestCallSequence;
17:
18: @Configuration(beforeTest=true,groups="fixture")
19: public void beforeTest() {
20: fixtureBeforeTestCallSequence = printGlobalCallSequence("TestFixture.beforeTest");
21: }
22:
23: public int getSomeRandomValue() {
24: return 20;
25: }
26:
27: }
|