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 UI Tests" annotations="JDK"> |
| 4 | <listeners> |
Eylon Malin | f076ec7 | 2019-08-15 16:42:22 +0300 | [diff] [blame] | 5 | <listener class-name="vid.automation.test.infra.SkipTestsTestngTransformer"/> |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 6 | </listeners> |
| 7 | <test name="test"> |
| 8 | <method-selectors> |
| 9 | <method-selector> |
| 10 | <script language="beanshell"> |
| 11 | <![CDATA[ |
| 12 | String [] exclusionGroups = new String [] { |
| 13 | "shouldBeMigratedToWorkWithSimulator", |
| 14 | "underDevelopment", |
| 15 | "Angular2Tests", |
| 16 | "worksOnlyWithLocalhostVID", |
| 17 | "worksOnlyWithLocalASDC" |
| 18 | }; |
| 19 | String [] classes2 = new String [] { |
| 20 | "vid.automation.test.test.AddNetworkTest", |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 21 | "vid.automation.test.test.BrowseASDCTest", |
| 22 | "vid.automation.test.test.ChangeManagementTest", |
Ittay Stern | 6ad41e3 | 2018-12-31 17:21:27 +0200 | [diff] [blame] | 23 | "vid.automation.test.test.ALaCarteflowTest", |
| 24 | "vid.automation.test.test.VlanTagSubInterfaceTest", |
Ittay Stern | f790c78 | 2020-01-02 17:36:33 +0200 | [diff] [blame] | 25 | "vid.automation.test.test.CreatePortMirroringConfigurationTest", |
Ittay Stern | 6ad41e3 | 2018-12-31 17:21:27 +0200 | [diff] [blame] | 26 | "vid.automation.test.test.CreateNewInstanceTest" |
| 27 | }; |
| 28 | |
| 29 | String [] classes3 = new String [] { |
Ittay Stern | f790c78 | 2020-01-02 17:36:33 +0200 | [diff] [blame] | 30 | "vid.automation.test.test.NewServiceInstanceTest" |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 31 | }; |
Ittay Stern | 6ad41e3 | 2018-12-31 17:21:27 +0200 | [diff] [blame] | 32 | |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 33 | String [] classes4 = new String [] { |
Ittay Stern | 6ad41e3 | 2018-12-31 17:21:27 +0200 | [diff] [blame] | 34 | "vid.automation.test.test.DrawingBoardTest", |
| 35 | "vid.automation.test.test.ViewEditServiceInstanceTest" |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | int selectPart = 0; |
| 39 | |
| 40 | for (g: exclusionGroups) { |
| 41 | if (groups.containsKey(g)) return false; |
| 42 | } |
| 43 | |
| 44 | if (selectPart == 0) return true; |
| 45 | |
Ittay Stern | fc0d293 | 2020-05-07 10:13:03 +0300 | [diff] [blame] | 46 | for (groupName: groups.keySet()) { |
| 47 | // There's a non-obvious case here: |
| 48 | // If there's a "partialGroup" group, and it is *not* for current `selectPart` then |
| 49 | // don't run the test -- even if it is in a Class which does belong to the `selectPart` |
| 50 | // classes list |
| 51 | if (groupName.startsWith("partialGroup_")) { |
| 52 | return groupName.equals("partialGroup_" + selectPart); |
| 53 | } |
| 54 | } |
| 55 | |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 56 | methodClass = method.getDeclaringClass().toString(); |
| 57 | for (c: classes2) { |
| 58 | if (methodClass.contains(c)) return selectPart==2; |
| 59 | } |
| 60 | for (c: classes3) { |
| 61 | if (methodClass.contains(c)) return selectPart==3; |
| 62 | } |
| 63 | for (c: classes4) { |
| 64 | if (methodClass.contains(c)) return selectPart==4; |
| 65 | } |
| 66 | // else |
| 67 | return selectPart==1; |
| 68 | ]]> |
| 69 | </script> |
| 70 | </method-selector> |
| 71 | </method-selectors> |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 72 | |
Sonsino, Ofir (os0695) | 4a4dcc5 | 2018-08-12 14:51:28 +0300 | [diff] [blame] | 73 | <packages> |
| 74 | <package name="vid.automation.test.test.*"/> |
| 75 | </packages> |
| 76 | </test> |
Eylon Malin | 7bb28ca | 2019-08-15 11:39:22 +0300 | [diff] [blame] | 77 | </suite> |