diff options
author | Amichai Hemli <ah0398@intl.att.com> | 2019-07-09 14:23:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-09 14:23:37 +0000 |
commit | 58d22b526418ffeb89337fed9e20406da420bc6f (patch) | |
tree | 4357c9cfe1c92d57ac0a3f90167cade7af505b95 /vid-automation/TestNg-ApiTest.xml | |
parent | 302b02a847e7aa8ccf3ff4bc14ff8a9cf67511b0 (diff) | |
parent | 97d9f66df456ef4573047a90baa3cc3ee4bfb0b7 (diff) |
Merge changes Ib4430bf2,Icc0bdb9e,I2736b984
* changes:
Merge from ecomp 718fd196 - Ext. Services Simulator
Merge from ecomp 718fd196 - Integration Tests
Merge from ecomp 718fd196 - Modern UI
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> |