01: package test.sample;
02:
03: /**
04: * This class tests groups that are partially defined at the class level
05: * and then augmented at the method level.
06: *
07: * @author cbeust
08: * @testng.test groups="classGroup"
09: */
10: public class PartialGroupTest {
11: public static boolean m_successMethod = false;
12: public static boolean m_successClass = false;
13:
14: /**
15: * @testng.before-class
16: */
17: public void init() {
18: m_successMethod = false;
19: m_successClass = false;
20: }
21:
22: /**
23: * @testng.test groups="methodGroup"
24: */
25: public void testMethodGroup() {
26: m_successMethod = true;
27: }
28:
29: /**
30: * @testng.test
31: */
32: public void testClassGroup() {
33: m_successClass = true;
34: }
35:
36: /**
37: * @testng.test groups="methodGroup"
38: */
39: public void testMethodGroupShouldFail() {
40: // System.out.println("testMethodGroupShouldFail");
41: assert false;
42: }
43:
44: /**
45: * @testng.test
46: */
47: public void testClassGroupShouldFail() {
48: // System.out.println("testClassGroupShouldFail");
49: assert false;
50: }
51:
52: }
|