01: package test.dependent;
02:
03: import org.testng.annotations.Test;
04:
05: import test.BaseTest;
06:
07: public class ImplicitGroupInclusionTest extends BaseTest {
08:
09: @Test
10: public void verifyImplicitGroupInclusion() {
11: addClass("test.dependent.ImplicitGroupInclusionSampleTest");
12: addIncludedGroup("b");
13:
14: run();
15: String[] passed = { "a", "b", "z" };
16: String[] failed = {};
17: String[] skipped = {};
18: verifyTests("Failed", failed, getFailedTests());
19: verifyTests("Passed", passed, getPassedTests());
20: verifyTests("Skipped", skipped, getSkippedTests());
21: }
22:
23: @Test
24: public void verifyImplicitGroupInclusion2() {
25: addClass("test.dependent.ImplicitGroupInclusion2SampleTest");
26: addIncludedGroup("g2");
27:
28: run();
29: String[] passed = { "m3" };
30: String[] failed = {};
31: String[] skipped = {};
32: verifyTests("Failed", failed, getFailedTests());
33: verifyTests("Passed", passed, getPassedTests());
34: verifyTests("Skipped", skipped, getSkippedTests());
35: }
36:
37: @Test
38: public void verifyImplicitGroupInclusion4() {
39: addClass("test.dependent.ImplicitGroupInclusion4SampleTest");
40: addIncludedGroup("g2");
41:
42: run();
43: String[] passed = { "m3", "m4" };
44: String[] failed = {};
45: String[] skipped = {};
46: verifyTests("Failed", failed, getFailedTests());
47: verifyTests("Passed", passed, getPassedTests());
48: verifyTests("Skipped", skipped, getSkippedTests());
49: }
50:
51: @Test
52: public void verifyImplicitGroupInclusion3() {
53: addClass("test.dependent.ImplicitGroupInclusion3SampleTest");
54: addIncludedGroup("inc");
55: addExcludedGroup("exc");
56:
57: run();
58: String[] passed = { "test1" };
59: String[] failed = {};
60: String[] skipped = {};
61: verifyTests("Failed", failed, getFailedTests());
62: verifyTests("Passed", passed, getPassedTests());
63: verifyTests("Skipped", skipped, getSkippedTests());
64: }
65:
66: @Test
67: public void verifyImplicitMethodInclusion() {
68: addClass("test.dependent.ImplicitMethodInclusionSampleTest");
69: addIncludedGroup("windows");
70:
71: run();
72: String[] passed = { "a", "b" };
73: String[] failed = {};
74: String[] skipped = {};
75: verifyTests("Failed", failed, getFailedTests());
76: verifyTests("Passed", passed, getPassedTests());
77: verifyTests("Skipped", skipped, getSkippedTests());
78: }
79:
80: }
|