aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/TestNg-UI-half.xml
blob: b190738698d0250ca422e43afbea730cee0b07b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite verbose="1" name="VID UI Tests" annotations="JDK">
    <listeners>
        <listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer"/>
        <listener class-name="vid.automation.test.infra.SkipTestUntilTestngTransformer"/>
    </listeners>
    <test name="test">
        <method-selectors>
            <method-selector>
                <script language="beanshell">
                    <![CDATA[
                        String [] exclusionGroups = new String [] {
                            "shouldBeMigratedToWorkWithSimulator",
                            "underDevelopment",
                            "Angular2Tests",
                            "worksOnlyWithLocalhostVID",
                            "worksOnlyWithLocalASDC"
                        };
                        String [] classes2 = new String [] {
                            "vid.automation.test.test.AddNetworkTest",
                            "vid.automation.test.test.BrowseASDCTest",
                            "vid.automation.test.test.ChangeManagementTest",
                            "vid.automation.test.test.ALaCarteflowTest",
                            "vid.automation.test.test.VlanTagSubInterfaceTest",
                            "vid.automation.test.test.CreateNewInstanceTest"
                        };

                        String [] classes3 = new String [] {
                            "vid.automation.test.test.NewServiceInstanceTest",
                            "vid.automation.test.test.CreatePortMirroringConfigurationTest"
                        };

                        String [] classes4 = new String [] {
                            "vid.automation.test.test.DrawingBoardTest",
                            "vid.automation.test.test.ViewEditServiceInstanceTest"
                        };

                        int selectPart = 0;

                        for (g: exclusionGroups) {
                            if (groups.containsKey(g)) return false;
                        }

                        if (selectPart == 0) return true;

                        methodClass = method.getDeclaringClass().toString();
                        for (c: classes2) {
                            if (methodClass.contains(c)) return selectPart==2;
                        }
                        for (c: classes3) {
                            if (methodClass.contains(c)) return selectPart==3;
                        }
                        for (c: classes4) {
                            if (methodClass.contains(c)) return selectPart==4;
                        }
                        // else
                        return selectPart==1;
                    ]]>
                </script>
            </method-selector>
        </method-selectors>

        <packages>
            <package name="vid.automation.test.test.*"/>
        </packages>
    </test>
</suite>