diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-07-08 15:46:44 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-08 18:50:38 +0300 |
commit | f4dff328c0386c8901b5841943b11f0c13b3169f (patch) | |
tree | 4e64c3ee540410b2593c1ebecd0dddd3a4780592 /vid-automation/TestNg-ApiTest.xml | |
parent | f792671ae247a931f34d902e9276202b5016ef9a (diff) |
Merge from ecomp 718fd196 - Integration Tests
Issue-ID: VID-378
Change-Id: Icc0bdb9ef37b1d429d47c2070f76d1ee63ad7489
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/TestNg-ApiTest.xml')
-rw-r--r-- | vid-automation/TestNg-ApiTest.xml | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/vid-automation/TestNg-ApiTest.xml b/vid-automation/TestNg-ApiTest.xml index 440fed441..ddd0f7ba3 100644 --- a/vid-automation/TestNg-ApiTest.xml +++ b/vid-automation/TestNg-ApiTest.xml @@ -7,21 +7,43 @@ </listeners> <test name="test"> - <groups> - <run> - <!-- These tests require the settings in asdc.properties to be like - asdc.client.type=LOCAL so cannot run on pipeline--> - <exclude name="worksOnlyWithLocalASDC"/> + <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 --> - <exclude name="worksOnlyWithLocalhostVID"/> + //these tests call to MaintenanceController which is restricted to localhost, so it can not run on jenkins pipeline - <!-- tests and features that are still under development but are pushed to develop --> - <exclude name="underDevelopment"/> + String [] exclusionGroups = new String [] { + "worksOnlyWithLocalASDC", + "worksOnlyWithLocalhostVID", + "underDevelopment" + }; - </run> - </groups> + 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: classes1) { + if (methodClass.endsWith(c)) return selectPart==1; + } + + // else + return selectPart==2; + ]]> + </script> + </method-selector> + </method-selectors> <packages> <package name="org.onap.vid.*"/> </packages> |