Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 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> |
Eylon Malin | f076ec7 | 2019-08-15 16:42:22 +0300 | [diff] [blame] | 6 | <listener class-name="vid.automation.test.infra.SkipTestsTestngTransformer" /> |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 7 | </listeners> |
| 8 | |
| 9 | <test name="test"> |
Ittay Stern | f4dff32 | 2019-07-08 15:46:44 +0300 | [diff] [blame] | 10 | <method-selectors> |
| 11 | <method-selector> |
| 12 | <script language="beanshell"> |
| 13 | <![CDATA[ |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 14 | |
Ittay Stern | f4dff32 | 2019-07-08 15:46:44 +0300 | [diff] [blame] | 15 | //these tests call to MaintenanceController which is restricted to localhost, so it can not run on jenkins pipeline |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 16 | |
Ittay Stern | f4dff32 | 2019-07-08 15:46:44 +0300 | [diff] [blame] | 17 | String [] exclusionGroups = new String [] { |
| 18 | "worksOnlyWithLocalASDC", |
| 19 | "worksOnlyWithLocalhostVID", |
| 20 | "underDevelopment" |
| 21 | }; |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 22 | |
Ittay Stern | 74f309f | 2019-12-03 20:38:44 +0200 | [diff] [blame] | 23 | String [] testClassesToRunAlways = new String [] { |
| 24 | "LoggerFormatTest" |
| 25 | }; |
| 26 | |
Ittay Stern | f4dff32 | 2019-07-08 15:46:44 +0300 | [diff] [blame] | 27 | String [] classes1 = new String [] { |
| 28 | "AsyncInstantiationALaCarteApiTest" |
| 29 | }; |
| 30 | int selectPart = 0; |
| 31 | |
| 32 | for (g: exclusionGroups) { |
| 33 | if (groups.containsKey(g)) return false; |
| 34 | } |
| 35 | if (selectPart == 0) return true; |
| 36 | |
| 37 | methodClass = method.getDeclaringClass().toString(); |
| 38 | |
| 39 | if (methodClass.contains("org.onap.vid.api.Base")) return true; |
| 40 | |
Ittay Stern | 74f309f | 2019-12-03 20:38:44 +0200 | [diff] [blame] | 41 | for (c: testClassesToRunAlways) { |
| 42 | if (methodClass.endsWith(c)) return true; // repeat in any selectPart value |
| 43 | } |
| 44 | |
Ittay Stern | f4dff32 | 2019-07-08 15:46:44 +0300 | [diff] [blame] | 45 | for (c: classes1) { |
| 46 | if (methodClass.endsWith(c)) return selectPart==1; |
| 47 | } |
| 48 | |
| 49 | // else |
| 50 | return selectPart==2; |
| 51 | ]]> |
| 52 | </script> |
| 53 | </method-selector> |
| 54 | </method-selectors> |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 55 | <packages> |
Ittay Stern | 6ad41e3 | 2018-12-31 17:21:27 +0200 | [diff] [blame] | 56 | <package name="org.onap.vid.*"/> |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 57 | </packages> |
| 58 | </test> |
Eylon Malin | 7bb28ca | 2019-08-15 11:39:22 +0300 | [diff] [blame] | 59 | </suite> |