new UI onboarding test 48/70948/2
authorYuli Shlosberg <ys9693@att.com>
Mon, 22 Oct 2018 13:54:02 +0000 (16:54 +0300)
committerMichael Lando <michael.lando@intl.att.com>
Tue, 23 Oct 2018 13:53:36 +0000 (13:53 +0000)
Change-Id: I2594e1d4e5c1112bb7845d9fd69d88ceb1e0fa67
Issue-ID: SDC-1854
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnbordingDataProviders.java
ui-ci/pom.xml
ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/OnboardingFlowsUI.java
ui-ci/src/main/resources/ci/testSuites/onapUiSanity.xml

index b61daf8..9f9fd99 100644 (file)
@@ -29,12 +29,19 @@ public class OnbordingDataProviders {
        
        @DataProvider(name = "VNF_List" , parallel = true)
        private static final Object[][] VnfList() throws Exception {
-               
                List<String> fileNamesFromFolder = OnboardingUtils.getVnfNamesFileList();
-               
                System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.size()));
                return provideData(fileNamesFromFolder, filepath);
        }
+
+       @DataProvider(name = "Single_VNF" , parallel = true)
+       private static final Object[][] SingleVNF() throws Exception {
+               List<String> fileNamesFromFolder = OnboardingUtils.getVnfNamesFileList();
+               List<String> newList = new ArrayList<>();
+               newList.add(fileNamesFromFolder.get(0));
+               System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.size()));
+               return provideData(newList, filepath);
+       }
        
 //     -----------------------factories-----------------------------------------
 
index c5b5b09..2b76309 100644 (file)
                                                                        <directory>${project.basedir}/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/testSuites</directory>
                                                                        <followSymlinks>false</followSymlinks>
                                                                </fileset>
+                                                               <!-- VNF files -->
+                                                               <fileset>
+                                                                       <directory>${project.basedir}/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/Files/VNFs</directory>
+                                                                       <followSymlinks>false</followSymlinks>
+                                                               </fileset>
                                                        </filesets>
                                                </configuration>
                                        </execution>
index 1a14410..77b2a0a 100644 (file)
@@ -98,6 +98,15 @@ public class OnboardingFlowsUI extends SetupCDTest {
         runOnboardToDistributionFlow(resourceReqDetails, serviceReqDetails, filePath, vnfFile);
     }
 
+    @Test(dataProviderClass = org.openecomp.sdc.ci.tests.dataProviders.OnbordingDataProviders.class, dataProvider = "Single_VNF")
+    public void onapOnboardVNFflow(String filePath, String vnfFile) throws Exception, Throwable {
+        setLog(vnfFile);
+        ResourceReqDetails resourceReqDetails = ElementFactory.getDefaultResource();//getResourceReqDetails(ComponentConfigurationTypeEnum.DEFAULT);
+        ServiceReqDetails serviceReqDetails = ElementFactory.getDefaultService();//getServiceReqDetails(ComponentConfigurationTypeEnum.DEFAULT);
+        System.out.println("print - >" + makeDistributionValue);
+        runOnboardToDistributionFlow(resourceReqDetails, serviceReqDetails, filePath, vnfFile);
+    }
+
 
     public void runOnboardToDistributionFlow(ResourceReqDetails resourceReqDetails, ServiceReqDetails serviceMetadata, String filePath, String vnfFile) throws Exception {
         getExtendTest().log(Status.INFO, "Going to create resource with category: " + resourceReqDetails.getCategories().get(0).getName()
index 480abdd..de03d3d 100644 (file)
@@ -2,6 +2,8 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
 <suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="1">
 
+    <parameter name="makeDistribution"  value="false"/>
+
   <test name="uiSanity">
     <classes>
 
             </methods>
         </class>
 
+
+        <class name="org.openecomp.sdc.ci.tests.execute.sanity.OnboardingFlowsUI">
+            <methods>
+                <include name="onapOnboardVNFflow"/>
+            </methods>
+        </class>
+
+
                                                
     </classes>
   </test> <!-- uitests -->