Merge "Sonar Fix - HttpsAuthClient.java"
[vid.git] / vid-automation / TestNg-ApiTest.xml
1 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
2
3 <suite verbose="1" name="VID API Tests" annotations="JDK">
4
5     <listeners>
6         <listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer" />
7         <listener class-name="vid.automation.test.infra.SkipTestUntilTestngTransformer"/>
8     </listeners>
9
10     <test name="test">
11         <method-selectors>
12             <method-selector>
13                 <script language="beanshell">
14                     <![CDATA[
15
16                         //these tests call to MaintenanceController which is restricted to localhost, so it can not run on jenkins pipeline
17
18                         String [] exclusionGroups = new String [] {
19                             "worksOnlyWithLocalASDC",
20                             "worksOnlyWithLocalhostVID",
21                             "underDevelopment"
22                         };
23
24                         String [] classes1 = new String [] {
25                             "AsyncInstantiationALaCarteApiTest"
26                         };
27                         int selectPart = 0;
28
29                         for (g: exclusionGroups) {
30                             if (groups.containsKey(g)) return false;
31                         }
32                         if (selectPart == 0) return true;
33
34                         methodClass = method.getDeclaringClass().toString();
35
36                         if (methodClass.contains("org.onap.vid.api.Base")) return true;
37
38                         for (c: classes1) {
39                             if (methodClass.endsWith(c)) return selectPart==1;
40                         }
41
42                         // else
43                         return selectPart==2;
44                     ]]>
45                 </script>
46             </method-selector>
47         </method-selectors>
48         <packages>
49             <package name="org.onap.vid.*"/>
50         </packages>
51     </test>
52 </suite>