| <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> |
| |
| <suite verbose="1" name="VID API Tests" annotations="JDK"> |
| |
| <listeners> |
| <listener class-name="vid.automation.test.infra.SkipTestsTestngTransformer" /> |
| </listeners> |
| |
| <test name="test"> |
| <method-selectors> |
| <method-selector> |
| <script language="beanshell"> |
| <![CDATA[ |
| |
| //these tests call to MaintenanceController which is restricted to localhost, so it can not run on jenkins pipeline |
| |
| String [] exclusionGroups = new String [] { |
| "worksOnlyWithLocalASDC", |
| "worksOnlyWithLocalhostVID", |
| "underDevelopment" |
| }; |
| |
| String [] testClassesToRunAlways = new String [] { |
| "LoggerFormatTest" |
| }; |
| |
| String [] classes1 = new String [] { |
| "AsyncInstantiationALaCarteApiTest" |
| }; |
| int selectPart = 0; |
| |
| for (g: exclusionGroups) { |
| if (groups.containsKey(g)) return false; |
| } |
| if (selectPart == 0) return true; |
| |
| methodClass = method.getDeclaringClass().toString(); |
| |
| if (methodClass.contains("org.onap.vid.api.Base")) return true; |
| |
| for (c: testClassesToRunAlways) { |
| if (methodClass.endsWith(c)) return true; // repeat in any selectPart value |
| } |
| |
| for (c: classes1) { |
| if (methodClass.endsWith(c)) return selectPart==1; |
| } |
| |
| // else |
| return selectPart==2; |
| ]]> |
| </script> |
| </method-selector> |
| </method-selectors> |
| <packages> |
| <package name="org.onap.vid.*"/> |
| </packages> |
| </test> |
| </suite> |