diff options
Diffstat (limited to 'ui-ci')
26 files changed, 368 insertions, 312 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/US/Service_Tests_UI.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/US/Service_Tests_UI.java index 80801afafb..a4c7ffa632 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/US/Service_Tests_UI.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/US/Service_Tests_UI.java @@ -54,7 +54,7 @@ public class Service_Tests_UI extends SetupCDTest{ @Test public void declareVL_CP_InputsInServiceLevel() throws Exception { String vnfFile = "FDNT.zip"; - Pair<String,Map<String,String>> VspName =OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String,Map<String,String>> VspName =OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); ServiceReqDetails servicemetadata = ElementFactory.getDefaultService(getUser()); ServiceUIUtils.createService(servicemetadata, getUser()); GeneralUIUtils.moveToStep(StepsEnum.COMPOSITION); @@ -72,7 +72,7 @@ public class Service_Tests_UI extends SetupCDTest{ @Test public void CreateServiceWithCpInstance() throws Exception { String vnfFile = "FDNT.zip"; - Pair<String,Map<String,String>> VspName =OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String,Map<String,String>> VspName =OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); ServiceReqDetails servicemetadata = ElementFactory.getDefaultService(getUser()); ServiceUIUtils.createService(servicemetadata, getUser()); GeneralUIUtils.moveToStep(StepsEnum.COMPOSITION); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CatalogLeftPanelTest.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CatalogLeftPanelTest.java index 519f1e1a76..f0bc6f7505 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CatalogLeftPanelTest.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CatalogLeftPanelTest.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; import static org.testng.AssertJUnit.assertTrue; -import java.io.File; import java.util.Arrays; import java.util.List; @@ -58,15 +57,7 @@ public class CatalogLeftPanelTest extends SetupCDTest{ private String filePath; @BeforeMethod public void beforeTest(){ - filePath = System.getProperty("filepath"); - - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } + filePath = FileHandling.getFilePath(""); } public static String[] resourceTypes = Arrays.stream(ResourceTypeEnum.class.getEnumConstants()). diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CustomizationUUID.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CustomizationUUID.java index 2c2b09af22..b8b7bd752e 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CustomizationUUID.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/CustomizationUUID.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; -import java.io.File; import java.util.ArrayList; import java.util.List; @@ -71,15 +70,7 @@ public class CustomizationUUID extends SetupCDTest { @BeforeMethod public void beforeTest(){ - filePath = System.getProperty("filepath"); - - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } + filePath = FileHandling.getFilePath(""); } @Test diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/DeploymentViewTests.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/DeploymentViewTests.java index 2e25eddd2c..1af68d9364 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/DeploymentViewTests.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/DeploymentViewTests.java @@ -20,10 +20,8 @@ package org.openecomp.sdc.ci.tests.execute.sanity; -import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; -import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -56,15 +54,7 @@ public class DeploymentViewTests extends SetupCDTest { @BeforeMethod public void beforeTest(){ - filePath = System.getProperty("filepath"); - - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } + filePath = FileHandling.getFilePath(""); } @DataProvider(name = "CSAR_VF_Files", parallel = false) diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java index 6a80dfe854..a26919ae2a 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportDCAE.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; import static org.testng.AssertJUnit.assertTrue; -import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -36,11 +35,11 @@ import org.openecomp.sdc.ci.tests.datatypes.ArtifactInfo; import org.openecomp.sdc.ci.tests.datatypes.CanvasElement; import org.openecomp.sdc.ci.tests.datatypes.CanvasManager; import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum; -import org.openecomp.sdc.ci.tests.datatypes.LifeCycleStateEnum; -import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.InformationalArtifactsPlaceholders; import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.LeftPanelCanvasItems; import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.ResourceMetadataEnum; +import org.openecomp.sdc.ci.tests.datatypes.LifeCycleStateEnum; +import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.NormativeTypesEnum; import org.openecomp.sdc.ci.tests.datatypes.enums.PropertyTypeEnum; @@ -50,7 +49,6 @@ import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse; import org.openecomp.sdc.ci.tests.execute.setup.SetupCDTest; import org.openecomp.sdc.ci.tests.pages.CompositionPage; import org.openecomp.sdc.ci.tests.pages.DeploymentArtifactPage; -import org.openecomp.sdc.ci.tests.pages.DeploymentPage; import org.openecomp.sdc.ci.tests.pages.GeneralPageElements; import org.openecomp.sdc.ci.tests.pages.InformationalArtifactPage; import org.openecomp.sdc.ci.tests.pages.InputsPage; @@ -81,18 +79,12 @@ import com.aventstack.extentreports.Status; public class ImportDCAE extends SetupCDTest { + private static final String SERVICE_INPUT_TEST_VF2_CSAR = "service_input_test_VF2.csar"; private String filePath; + @BeforeMethod public void beforeTest(){ - filePath = System.getProperty("filepath"); - - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } + filePath = FileHandling.getFilePath(""); } @Test @@ -159,8 +151,8 @@ public class ImportDCAE extends SetupCDTest { ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen(); List<ArtifactInfo> deploymentArtifactList = new ArrayList<ArtifactInfo>(); - deploymentArtifactList.add(new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", "OTHER")); - deploymentArtifactList.add(new ArtifactInfo(filePath, "sample-xml-alldata-1-1.xml", "cuku", "artifact2", "YANG_XML")); + deploymentArtifactList.add(new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", ArtifactTypeEnum.OTHER.getType())); + deploymentArtifactList.add(new ArtifactInfo(filePath, "sample-xml-alldata-1-1.xml", "cuku", "artifact2", ArtifactTypeEnum.YANG_XML.getType())); for (ArtifactInfo deploymentArtifact : deploymentArtifactList) { DeploymentArtifactPage.clickAddNewArtifact(); ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact); @@ -186,7 +178,7 @@ public class ImportDCAE extends SetupCDTest { createDCAEAsset(); ResourceGeneralPage.getLeftMenu().moveToInformationalArtifactScreen(); - ArtifactInfo informationalArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", "OTHER"); + ArtifactInfo informationalArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", ArtifactTypeEnum.OTHER.getType()); InformationalArtifactPage.clickAddNewArtifact(); ArtifactUIUtils.fillAndAddNewArtifactParameters(informationalArtifact); @@ -436,7 +428,7 @@ public class ImportDCAE extends SetupCDTest { ResourceGeneralPage.getLeftMenu().moveToCompositionScreen(); - ArtifactInfo artifact = new ArtifactInfo(filePath, "Heat-File.yaml", "kuku", "artifact3","OTHER"); + ArtifactInfo artifact = new ArtifactInfo(filePath, "Heat-File.yaml", "kuku", "artifact3",ArtifactTypeEnum.OTHER.getType()); CompositionPage.showDeploymentArtifactTab(); CompositionPage.clickAddArtifactButton(); ArtifactUIUtils.fillAndAddNewArtifactParameters(artifact, CompositionPage.artifactPopup()); @@ -467,7 +459,7 @@ public class ImportDCAE extends SetupCDTest { ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen(); - ArtifactInfo deploymentArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", "OTHER"); + ArtifactInfo deploymentArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", ArtifactTypeEnum.OTHER.getType()); DeploymentArtifactPage.clickAddNewArtifact(); ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact); assertTrue(DeploymentArtifactPage.checkElementsCountInTable(1)); @@ -588,7 +580,7 @@ public class ImportDCAE extends SetupCDTest { @Test public void removeFileFromGeneralPageDCAEAssetTest() throws Exception{ - String fileName2 = "service_input_test_VF2.csar"; + String fileName2 = SERVICE_INPUT_TEST_VF2_CSAR; ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType("ciRes", NormativeTypesEnum.ROOT, ResourceCategoryEnum.APPLICATION_L4_DATABASE, getUser().getUserId(), ResourceTypeEnum.VF.toString()); ResourceUIUtils.importVfFromCsarNoCreate(resourceMetaData, filePath, fileName2, getUser()); GeneralPageElements.clickDeleteFile(); @@ -608,7 +600,7 @@ public class ImportDCAE extends SetupCDTest { ResourceGeneralPage.getLeftMenu().moveToInformationalArtifactScreen(); - ArtifactInfo informationalArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", "OTHER"); + ArtifactInfo informationalArtifact = new ArtifactInfo(filePath, "asc_heat 0 2.yaml", "kuku", "artifact1", ArtifactTypeEnum.OTHER.getType()); InformationalArtifactPage.clickAddNewArtifact(); ArtifactUIUtils.fillAndAddNewArtifactParameters(informationalArtifact); @@ -655,15 +647,13 @@ public class ImportDCAE extends SetupCDTest { @Test public void validContactAfterCreateDCAEAssetTest() throws Exception{ - String fileName2 = "service_input_test_VF2.csar"; - ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType("ciRes", NormativeTypesEnum.ROOT, ResourceCategoryEnum.APPLICATION_L4_DATABASE, getUser().getUserId(), ResourceTypeEnum.VF.toString()); - ResourceUIUtils.importVfFromCsar(resourceMetaData, filePath, fileName2, getUser()); + ResourceReqDetails resourceMetaData = createDCAEAsset(); SetupCDTest.getExtendTest().log(Status.INFO, String.format("Validating that userID equal to user that was logged in...")); - assertTrue("wrong userId", resourceMetaData.getContactId().equals(ResourceGeneralPage.getContactIdText())); + assertTrue("Wrong userId", resourceMetaData.getContactId().equals(ResourceGeneralPage.getContactIdText())); } public ResourceReqDetails createDCAEAsset() throws Exception{ - String fileName2 = "service_input_test_VF2.csar"; + String fileName2 = SERVICE_INPUT_TEST_VF2_CSAR; ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType("ciRes", NormativeTypesEnum.ROOT, ResourceCategoryEnum.APPLICATION_L4_DATABASE, getUser().getUserId(), ResourceTypeEnum.VF.toString()); ResourceUIUtils.importVfFromCsar(resourceMetaData, filePath, fileName2, getUser()); resourceMetaData.setVersion("0.1"); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportVFCAsset.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportVFCAsset.java index c129636291..fca568794b 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportVFCAsset.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/ImportVFCAsset.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; import static org.testng.AssertJUnit.assertTrue; -import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -59,12 +58,9 @@ import org.openecomp.sdc.ci.tests.verificator.VfVerificator; import org.testng.Assert; import org.testng.SkipException; import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import com.aventstack.extentreports.Status; - public class ImportVFCAsset extends SetupCDTest { private ResourceReqDetails atomicResourceMetaData; @@ -72,13 +68,7 @@ public class ImportVFCAsset extends SetupCDTest { private String filePath; @BeforeClass public void beforeClass(){ - filePath = System.getProperty("filepath"); - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator + ""; - } + filePath = FileHandling.getFilePath(""); } @DataProvider(name = "assetFiles", parallel = false) diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java index 2db818948a..0c4802af64 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java @@ -25,6 +25,7 @@ import static org.testng.AssertJUnit.assertTrue; import java.awt.AWTException; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -68,7 +69,7 @@ import com.clearspring.analytics.util.Pair; public class Onboard extends SetupCDTest { - + protected static String filepath = FileHandling.getVnfRepositoryPath(); protected String makeDistributionValue; @Parameters({ "makeDistribution" }) @@ -77,8 +78,18 @@ public class Onboard extends SetupCDTest { makeDistributionValue = makeDistributionReadValue; } - public static Object[][] provideData(Object[] fileNamesFromFolder, String filepath) { - Object[][] arObject = new Object[fileNamesFromFolder.length][]; +// public static Object[][] provideData(Object[] fileNamesFromFolder, String filepath) { +// Object[][] arObject = new Object[fileNamesFromFolder.length][]; +// +// int index = 0; +// for (Object obj : fileNamesFromFolder) { +// arObject[index++] = new Object[] { filepath, obj }; +// } +// return arObject; +// } + + public static Object[][] provideData(List<String> fileNamesFromFolder, String filepath) { + Object[][] arObject = new Object[fileNamesFromFolder.size()][]; int index = 0; for (Object obj : fileNamesFromFolder) { @@ -86,81 +97,112 @@ public class Onboard extends SetupCDTest { } return arObject; } - + @DataProvider(name = "VNF_List" , parallel = true) private static final Object[][] VnfList() throws Exception { - String filepath = getFilePath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.length)); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> exludeVnfList = Arrays.asList("2016-197_vscp_vscp-fw_1610_e2e.zip", "2016-281_vProbes_BE_11_1_f_30_1610_e2e.zip", + "2016-282_vProbes_FE_11_1_f_30_1610_e2e.zip", "2016-044_vfw_fnat_30_1607_e2e.zip", "2017-376_vMOG_11_1.zip", "vMOG.zip", + "vMRF_USP_AIC3.0_1702.zip", "2016-211_vprobesbe_vprobes_be_30_1610_e2e.zip", "2016-005_vprobesfe_vprobes_fe_30_1607_e2e.zip", + "vMRF_RTT.zip", "2016-006_vvm_vvm_30_1607_e2e.zip", "2016-001_vvm_vvm_30_1607_e2e.zip"); + fileNamesFromFolder.removeAll(exludeVnfList); + + System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.size())); return provideData(fileNamesFromFolder, filepath); } +// @DataProvider(name = "randomVNF_List", parallel = false) +// private static final Object[][] randomVnfList() throws Exception { +// int randomElementNumber = 3; //how many VNFs to onboard randomly +// String filepath = getFilePath(); +// Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); +// Object[] newRandomFileNamesFromFolder = getRandomElements(randomElementNumber, fileNamesFromFolder); +// System.out.println(String.format("There are %s zip file(s) to test", newRandomFileNamesFromFolder.length)); +// return provideData(newRandomFileNamesFromFolder, filepath); +// } + @DataProvider(name = "randomVNF_List", parallel = false) private static final Object[][] randomVnfList() throws Exception { int randomElementNumber = 3; //how many VNFs to onboard randomly - String filepath = getFilePath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - Object[] newRandomFileNamesFromFolder = getRandomElements(randomElementNumber, fileNamesFromFolder); - System.out.println(String.format("There are %s zip file(s) to test", newRandomFileNamesFromFolder.length)); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> exludeVnfList = Arrays.asList("2016-197_vscp_vscp-fw_1610_e2e.zip", "2016-281_vProbes_BE_11_1_f_30_1610_e2e.zip", + "2016-282_vProbes_FE_11_1_f_30_1610_e2e.zip", "2016-044_vfw_fnat_30_1607_e2e.zip", "2017-376_vMOG_11_1.zip", "vMOG.zip", + "vMRF_USP_AIC3.0_1702.zip", "2016-211_vprobesbe_vprobes_be_30_1610_e2e.zip", "2016-005_vprobesfe_vprobes_fe_30_1607_e2e.zip", + "vMRF_RTT.zip", "2016-006_vvm_vvm_30_1607_e2e.zip", "2016-001_vvm_vvm_30_1607_e2e.zip"); + fileNamesFromFolder.removeAll(exludeVnfList); + List<String> newRandomFileNamesFromFolder = getRandomElements(randomElementNumber, fileNamesFromFolder); + System.out.println(String.format("There are %s zip file(s) to test", newRandomFileNamesFromFolder.size())); return provideData(newRandomFileNamesFromFolder, filepath); } - - private static Object[] getRandomElements(int randomElementNumber, Object[] fileNamesFromFolder) { - if(fileNamesFromFolder.length == 0 || fileNamesFromFolder.length < randomElementNumber){ + private static List<String> getRandomElements(int randomElementNumber, List<String> fileNamesFromFolder) { + if(fileNamesFromFolder.size() == 0 || fileNamesFromFolder.size() < randomElementNumber){ return null; }else{ List<Integer> indexList = new ArrayList<>(); - Object[] newRandomFileNamesFromFolder = new Object[randomElementNumber]; - for(int i = 0; i < fileNamesFromFolder.length; i++){ + List<String> newRandomFileNamesFromFolder = new ArrayList<>(); + for(int i = 0; i < fileNamesFromFolder.size(); i++){ indexList.add(i); } Collections.shuffle(indexList); Integer[] randomArray = indexList.subList(0, randomElementNumber).toArray(new Integer[randomElementNumber]); for(int i = 0; i < randomArray.length; i++){ - newRandomFileNamesFromFolder[i] = fileNamesFromFolder[randomArray[i]]; + newRandomFileNamesFromFolder.add(fileNamesFromFolder.get(randomArray[i])); } return newRandomFileNamesFromFolder; } } + +// private static Object[] getRandomElements(int randomElementNumber, Object[] fileNamesFromFolder) { +// if(fileNamesFromFolder.length == 0 || fileNamesFromFolder.length < randomElementNumber){ +// return null; +// }else{ +// List<Integer> indexList = new ArrayList<>(); +// Object[] newRandomFileNamesFromFolder = new Object[randomElementNumber]; +// for(int i = 0; i < fileNamesFromFolder.length; i++){ +// indexList.add(i); +// } +// Collections.shuffle(indexList); +// Integer[] randomArray = indexList.subList(0, randomElementNumber).toArray(new Integer[randomElementNumber]); +// for(int i = 0; i < randomArray.length; i++){ +// newRandomFileNamesFromFolder[i] = fileNamesFromFolder[randomArray[i]]; +// } +// return newRandomFileNamesFromFolder; +// } +// } - public static String getFilePath() { - String filepath = System.getProperty("filepath"); - if (filepath == null && System.getProperty("os.name").contains("Windows")) { - filepath = FileHandling.getResourcesFilesPath() +"VNFs"; - } - - else if(filepath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filepath = FileHandling.getBasePath() + File.separator + "Files" + File.separator +"VNFs"; - } - return filepath; - } +// public static String getFilePath() { +// String filepath = System.getProperty("filepath"); +// if (filepath == null && System.getProperty("os.name").contains("Windows")) { +// filepath = FileHandling.getResourcesFilesPath() +"VNFs"; +// } +// +// else if(filepath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ +// filepath = FileHandling.getBasePath() + File.separator + "Files" + File.separator +"VNFs"; +// } +// return filepath; +// } @Test public void onboardVNFTestSanity() throws Exception, Throwable { - String filepath = getFilePath(); // String vnfFile = "2016-012_vMX_AV_30_1072_e2e.zip"; // String filepath = getFilePath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - String vnfFile = fileNamesFromFolder[0].toString(); +// Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> exludeVnfList = Arrays.asList("2016-197_vscp_vscp-fw_1610_e2e.zip", "2016-281_vProbes_BE_11_1_f_30_1610_e2e.zip", + "2016-282_vProbes_FE_11_1_f_30_1610_e2e.zip", "2016-044_vfw_fnat_30_1607_e2e.zip", "2017-376_vMOG_11_1.zip", "vMOG.zip", + "vMRF_USP_AIC3.0_1702.zip", "2016-211_vprobesbe_vprobes_be_30_1610_e2e.zip", "2016-005_vprobesfe_vprobes_fe_30_1607_e2e.zip", + "vMRF_RTT.zip", "2016-006_vvm_vvm_30_1607_e2e.zip", "2016-001_vvm_vvm_30_1607_e2e.zip"); + fileNamesFromFolder.removeAll(exludeVnfList); + String vnfFile = fileNamesFromFolder.get(0).toString(); runOnboardToDistributionFlow(filepath, vnfFile); } public void runOnboardToDistributionFlow(String filepath, String vnfFile) throws Exception, AWTException { - Pair<String,Map<String,String>> onboardAndValidate = OnboardingUtils.onboardAndValidate(filepath, vnfFile, getUser()); - String vspName = onboardAndValidate.left; - - DeploymentArtifactPage.getLeftPanel().moveToCompositionScreen(); - ExtentTestActions.addScreenshot(Status.INFO, "TopologyTemplate_" + vnfFile ,"The topology template for " + vnfFile + " is as follows : "); - - DeploymentArtifactPage.clickSubmitForTestingButton(vspName); - - reloginWithNewRole(UserRoleEnum.TESTER); - GeneralUIUtils.findComponentAndClick(vspName); - TesterOperationPage.certifyComponent(vspName); + String vspName = onboardAndCertify(filepath, vnfFile); reloginWithNewRole(UserRoleEnum.DESIGNER); // create service @@ -207,6 +249,24 @@ public class Onboard extends SetupCDTest { getExtendTest().log(Status.INFO, String.format("The onboarding %s test is passed ! ", vnfFile)); } + public String onboardAndCertify(String filepath, String vnfFile) throws Exception, IOException { + Pair<String,Map<String,String>> onboardAndValidate = OnboardingUtils.onboardAndValidate(filepath, vnfFile, getUser()); + String vspName = onboardAndValidate.left; + + DeploymentArtifactPage.getLeftPanel().moveToCompositionScreen(); + ExtentTestActions.addScreenshot(Status.INFO, "TopologyTemplate_" + vnfFile ,"The topology template for " + vnfFile + " is as follows : "); + + DeploymentArtifactPage.clickSubmitForTestingButton(vspName); + + reloginWithNewRole(UserRoleEnum.TESTER); + GeneralUIUtils.findComponentAndClick(vspName); + TesterOperationPage.certifyComponent(vspName); + return vspName; + } + + + + // protected synchronized void validateInputArtsVSouput(String serviceName) { // // @@ -225,21 +285,29 @@ public class Onboard extends SetupCDTest { System.out.println("printttttttttttttt - >" + makeDistributionValue); runOnboardToDistributionFlow(filepath, vnfFile); } + + @Test(dataProvider = "VNF_List") + public void onboardVNFShotFlow(String filepath, String vnfFile) throws Exception, Throwable { + setLog(vnfFile); + System.out.println("printttttttttttttt - >" + makeDistributionValue); + onboardAndCertify(filepath, vnfFile); + } @Test(dataProvider = "randomVNF_List") public void onboardRandomVNFsTest(String filepath, String vnfFile) throws Exception, Throwable { setLog(vnfFile); System.out.println("printttttttttttttt - >" + makeDistributionValue); - System.out.println("vnf File name is: " + vnfFile); + System.out.println("Vnf File name is: " + vnfFile); runOnboardToDistributionFlow(filepath, vnfFile); } @Test public void onboardUpdateVNFTest() throws Exception, Throwable { - String filepath = getFilePath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - String vnfFile = fileNamesFromFolder[0].toString(); +// Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); +// String vnfFile = fileNamesFromFolder[0].toString(); + String vnfFile = fileNamesFromFolder.get(0); Pair<String,Map<String,String>> vsp = OnboardingUtils.onboardAndValidate(filepath, vnfFile, getUser()); String vspName = vsp.left; @@ -264,7 +332,8 @@ public class Onboard extends SetupCDTest { HomePage.navigateToHomePage(); ///update flow - String updatedVnfFile = fileNamesFromFolder[1].toString(); +// String updatedVnfFile = fileNamesFromFolder[1].toString(); + String updatedVnfFile = fileNamesFromFolder.get(1); getExtendTest().log(Status.INFO, String.format("Going to update the VNF with %s......", updatedVnfFile)); // update VendorSoftwareProduct @@ -309,15 +378,13 @@ public class Onboard extends SetupCDTest { OpsOperationPage.waitUntilArtifactsDistributed(0); - getExtendTest().log(Status.INFO, String.format("onboarding %s test is passed ! ", vnfFile)); + getExtendTest().log(Status.INFO, String.format("Onboarding %s test is passed ! ", vnfFile)); } @Test public void threeVMMSCsInServiceTest() throws Exception{ - String filepath = getFilePath(); - List<String> vmmscList = new ArrayList<String>(); vmmscList = Arrays.asList(new File(filepath).list()).stream().filter(e -> e.contains("vmmsc") && e.endsWith(".zip")).collect(Collectors.toList()); @@ -325,15 +392,15 @@ public class Onboard extends SetupCDTest { Map<String, String> vspNames = new HashMap<String, String>(); for (String vnfFile : vmmscList){ - getExtendTest().log(Status.INFO, String.format("going to onboard the VNF %s......", vnfFile)); - System.out.println(String.format("going to onboard the VNF %s......", vnfFile)); + getExtendTest().log(Status.INFO, String.format("Going to onboard the VNF %s......", vnfFile)); + System.out.println(String.format("Going to onboard the VNF %s......", vnfFile)); AmdocsLicenseMembers amdocsLicenseMembers = OnboardingUtils.createVendorLicense(getUser()); Pair<String,Map<String,String>> createVendorSoftwareProduct = OnboardingUtils.createVendorSoftwareProduct(vnfFile, filepath, getUser(), amdocsLicenseMembers); - getExtendTest().log(Status.INFO, String.format("searching for onboarded %s", vnfFile)); + getExtendTest().log(Status.INFO, String.format("Searching for onboarded %s", vnfFile)); HomePage.showVspRepository(); - getExtendTest().log(Status.INFO,String.format("going to import %s......", vnfFile.substring(0, vnfFile.indexOf(".")))); + getExtendTest().log(Status.INFO,String.format("Going to import %s......", vnfFile.substring(0, vnfFile.indexOf(".")))); OnboardingUtils.importVSP(createVendorSoftwareProduct); ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen(); @@ -391,19 +458,6 @@ public class Onboard extends SetupCDTest { } - - - - - - - - - - - - - @Override protected UserRoleEnum getRole() { return UserRoleEnum.DESIGNER; diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/OnboardViaApis.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/OnboardViaApis.java index 71fe44cc79..2ce944d273 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/OnboardViaApis.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/OnboardViaApis.java @@ -28,6 +28,7 @@ import java.io.FileOutputStream; import java.nio.charset.StandardCharsets; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -67,8 +68,8 @@ public class OnboardViaApis{ private static final String FULL_PATH = "C://tmp//CSARs//"; - public static Object[][] provideData(Object[] fileNamesFromFolder, String filepath) { - Object[][] arObject = new Object[fileNamesFromFolder.length][]; + public static Object[][] provideData(List<String> fileNamesFromFolder, String filepath) { + Object[][] arObject = new Object[fileNamesFromFolder.size()][]; int index = 0; for (Object obj : fileNamesFromFolder) { @@ -81,8 +82,14 @@ public class OnboardViaApis{ private static final Object[][] VnfList() throws Exception { String filepath = FileHandling.getVnfRepositoryPath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.length)); +// Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> exludeVnfList = Arrays.asList("2016-197_vscp_vscp-fw_1610_e2e.zip", "2016-281_vProbes_BE_11_1_f_30_1610_e2e.zip", + "2016-282_vProbes_FE_11_1_f_30_1610_e2e.zip", "2016-044_vfw_fnat_30_1607_e2e.zip", "2017-376_vMOG_11_1.zip", "vMOG.zip", + "vMRF_USP_AIC3.0_1702.zip", "2016-211_vprobesbe_vprobes_be_30_1610_e2e.zip", "2016-005_vprobesfe_vprobes_fe_30_1607_e2e.zip", + "vMRF_RTT.zip", "2016-006_vvm_vvm_30_1607_e2e.zip", "2016-001_vvm_vvm_30_1607_e2e.zip"); + fileNamesFromFolder.removeAll(exludeVnfList); + System.out.println(String.format("There are %s zip file(s) to test", fileNamesFromFolder.size())); return provideData(fileNamesFromFolder, filepath); } @@ -126,8 +133,9 @@ public class OnboardViaApis{ public void onboardingAndParser() throws Exception { Service service = null; String filepath = getFilePath(); - Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); - String vnfFile = fileNamesFromFolder[7].toString(); +// Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + List<String> fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); + String vnfFile = fileNamesFromFolder.get(7); System.err.println(timestamp + " Starting test with VNF: " + vnfFile); service = runOnboardViaApisOnly(filepath, vnfFile); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Product.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Product.java index e0e13b7036..c12a8f220a 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Product.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Product.java @@ -20,8 +20,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; -import java.io.File; - import org.openecomp.sdc.ci.tests.datatypes.CanvasElement; import org.openecomp.sdc.ci.tests.datatypes.CanvasManager; import org.openecomp.sdc.ci.tests.datatypes.ProductReqDetails; @@ -32,12 +30,10 @@ import org.openecomp.sdc.ci.tests.pages.CompositionPage; import org.openecomp.sdc.ci.tests.pages.GeneralPageElements; import org.openecomp.sdc.ci.tests.pages.ProductGeneralPage; import org.openecomp.sdc.ci.tests.pages.TesterOperationPage; -import org.openecomp.sdc.ci.tests.utilities.FileHandling; import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils; import org.openecomp.sdc.ci.tests.utilities.ProductUIUtils; import org.openecomp.sdc.ci.tests.utilities.ServiceUIUtils; import org.openecomp.sdc.ci.tests.utils.general.ElementFactory; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -47,21 +43,7 @@ import org.testng.annotations.Test; public class Product extends SetupCDTest { - private String filePath; - @BeforeMethod - public void beforeTest(){ - filePath = System.getProperty("filepath"); - - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } - } - @Test public void createProductAndAddCertifiedServiceInstance() throws Exception { ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService(); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java index 3a42d22d0e..9b4d97e0a7 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java @@ -372,6 +372,10 @@ public class Service extends SetupCDTest { @Test public void addDeploymentArtifactToVFInstanceTest() throws Exception{ + if(true){ + throw new SkipException("Open bug 321669"); + } + ResourceReqDetails atomicResourceMetaData = ElementFactory.getDefaultResourceByTypeNormTypeAndCatregory(ResourceTypeEnum.VF, NormativeTypesEnum.ROOT, ResourceCategoryEnum.NETWORK_L2_3_ROUTERS, getUser()); ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService(); ArtifactInfo artifact = new ArtifactInfo(filePath, HEAT_FILE_YAML_NAME, DESCRIPTION, ARTIFACT_LABEL,ArtifactTypeEnum.SNMP_POLL.getType()); @@ -401,6 +405,10 @@ public class Service extends SetupCDTest { @Test public void deleteDeploymentArtifactFromVFInstanceNextVersionTest() throws Exception{ + if(true){ + throw new SkipException("Open bug 322930"); + } + ResourceReqDetails atomicResourceMetaData = ElementFactory.getDefaultResourceByTypeNormTypeAndCatregory(ResourceTypeEnum.VF, NormativeTypesEnum.ROOT, ResourceCategoryEnum.NETWORK_L2_3_ROUTERS, getUser()); ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService(); ArtifactInfo artifact = new ArtifactInfo(filePath, HEAT_FILE_YAML_NAME, DESCRIPTION, ARTIFACT_LABEL,ArtifactTypeEnum.SNMP_POLL.getType()); @@ -426,6 +434,10 @@ public class Service extends SetupCDTest { @Test public void updateDeploymentArtifactOnVFInstanceNextVersionTest() throws Exception{ + if(true){ + throw new SkipException("Open bug 322930"); + } + ResourceReqDetails atomicResourceMetaData = ElementFactory.getDefaultResourceByTypeNormTypeAndCatregory(ResourceTypeEnum.VF, NormativeTypesEnum.ROOT, ResourceCategoryEnum.NETWORK_L2_3_ROUTERS, getUser()); ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService(); ArtifactInfo artifact = new ArtifactInfo(filePath, HEAT_FILE_YAML_NAME, DESCRIPTION, ARTIFACT_LABEL,ArtifactTypeEnum.SNMP_POLL.getType()); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VFCArtifacts.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VFCArtifacts.java index f8ad51ca14..9eee0e9096 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VFCArtifacts.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VFCArtifacts.java @@ -22,7 +22,6 @@ package org.openecomp.sdc.ci.tests.execute.sanity; import static org.testng.Assert.assertTrue; -import java.io.File; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -66,16 +65,9 @@ public class VFCArtifacts extends SetupCDTest { private static final String ARTIFACTS = "artifacts"; private static final String DEPLOYMENT_ARTIFACTS = "deploymentArtifacts"; private String filePath; - private Object object; @BeforeClass public void beforeClass(){ - filePath = System.getProperty("filepath"); - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath() + "VFCArtifacts"+ File.separator; - } - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator + "VFCArtifacts"+ File.separator; - } + filePath = FileHandling.getFilePath(""); } @Test diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java index ef7a534ee9..8763d677dd 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java @@ -92,13 +92,7 @@ public class Vf extends SetupCDTest { private String filePath; @BeforeClass public void beforeClass(){ - filePath = System.getProperty("filepath"); - if (filePath == null && System.getProperty("os.name").contains("Windows")) { - filePath = FileHandling.getResourcesFilesPath(); - } - else if(filePath.isEmpty() && !System.getProperty("os.name").contains("Windows")){ - filePath = FileHandling.getBasePath() + File.separator + "Files" + File.separator; - } + filePath = FileHandling.getFilePath(""); } @BeforeMethod @@ -519,7 +513,7 @@ public class Vf extends SetupCDTest { } @Test - public void addDeploymentArtifactAndVerifyInCompositionScreen() throws Exception{ + public void addDeploymentArtifactAndVerifyInCompositionScreen() throws Exception{ ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser()); ResourceUIUtils.createResource(vfMetaData, getUser()); @@ -653,7 +647,7 @@ public class Vf extends SetupCDTest { @Test public void exportToscaWithModulePropertiesVFTest() throws AWTException, Exception { String vnfFile = "2016-042_vmsp_pxmc_30_1607_e2e.zip"; - Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); String vspName = vsp.left; ResourceGeneralPage.clickSubmitForTestingButton(vsp.left); Resource resource = AtomicOperationUtils.getResourceObjectByNameAndVersion(UserRoleEnum.DESIGNER, vspName, "0.1"); @@ -663,7 +657,7 @@ public class Vf extends SetupCDTest { @Test public void exportToscaWithModulePropertiesTemplateCheckVFTest() throws AWTException, Exception { String vnfFile = "2016-042_vmsp_pxmc_30_1607_e2e.zip"; - OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen(); GeneralUIUtils.clickOnElementByTestId(ToscaArtifactsScreenEnum.TOSCA_MODEL.getValue()); File latestFilefromDir = FileHandling.getLastModifiedFileFromDir(); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfArtifacts.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfArtifacts.java index cf8bfa5e5e..86e81df0bb 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfArtifacts.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfArtifacts.java @@ -206,7 +206,7 @@ public class VfArtifacts extends SetupCDTest{ String vnfFile = "2016-043_vsaegw_fdnt_30_1607_e2e.zip"; String downloadDirPath=SetupCDTest.getConfig().getWindowsDownloadDirectory(); - Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); Map<String, File> currentZipEnvfiles=ArtifactBusinessLogic.createEnvFilesListFromCsar(vsp.left,downloadDirPath); GeneralUIUtils.findComponentAndClick(vsp.left); @@ -231,7 +231,7 @@ public class VfArtifacts extends SetupCDTest{ String downloadDirPath=SetupCDTest.getConfig().getWindowsDownloadDirectory(); String vnfFile = "2016-043_vsaegw_fdnt_30_1607_e2e.zip"; - Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String, Map<String, String>> vsp=OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); Map<String, File> currentZipEnvfiles=ArtifactBusinessLogic.createEnvFilesListFromCsar(vsp.left,downloadDirPath); GeneralUIUtils.findComponentAndClick(vsp.left); ResourceGeneralPage.getLeftMenu().moveToCompositionScreen(); @@ -255,7 +255,7 @@ public class VfArtifacts extends SetupCDTest{ String vnfFile = "2016-044_vfw_fcgi_30_1607_e2e.zip"; String downloadDirPath=SetupCDTest.getConfig().getWindowsDownloadDirectory(); - Pair<String, Map<String, String>> CreatedVsp=OnboardingUtils.onboardAndValidate(Onboard.getFilePath(), vnfFile, getUser()); + Pair<String, Map<String, String>> CreatedVsp=OnboardingUtils.onboardAndValidate(FileHandling.getVnfRepositoryPath(), vnfFile, getUser()); Resource resource = AtomicOperationUtils.getResourceObjectByNameAndVersion(UserRoleEnum.DESIGNER, CreatedVsp.left, "0.1"); Map<String, ArtifactDefinition> deploymentArtifacts = resource.getDeploymentArtifacts(); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java index 22396ec9c7..24badb3ec2 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java @@ -62,10 +62,9 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); - - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -78,15 +77,15 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName,folder, deploymentArtifacts, null); } @@ -104,11 +103,11 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); } @@ -126,13 +125,13 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); } @@ -150,18 +149,18 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); } @@ -181,9 +180,9 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -201,11 +200,11 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); } @@ -266,15 +265,15 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1"); fileName = "UpdateTC1443736.csar"; - deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, null, null); } @@ -289,9 +288,9 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); - ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); + ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); deploymentArtifacts.add(artifactInfo); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -316,9 +315,9 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); - ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); + ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); deploymentArtifacts.add(artifactInfo); @@ -345,8 +344,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -355,7 +354,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { fileName = "UpdateTC1443887.csar"; List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, null, null); } @@ -373,11 +372,11 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String fileName = "ImportTC1443888.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); + ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); informationalArtifacts.add(artifactInfo); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); @@ -407,11 +406,11 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String fileName = "ImportTC1443890.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); + ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); informationalArtifacts.add(artifactInfo); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); @@ -437,18 +436,18 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String fileName = "ImportUpdateTC1443893.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); @@ -471,12 +470,12 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder ="US825779"; String fileName = "ImportTC1443954.csar"; - ArtifactInfo deploymentHeat1 = new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); - ArtifactInfo deploymentHeat2 = new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1"); - ArtifactInfo deploymentHeat3 = new ArtifactInfo(null, "heatartifactname3.yaml", null, "heatartifactname3", ArtifactTypeEnum.HEAT.getType(), "1"); + ArtifactInfo deploymentHeat1 = new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); + ArtifactInfo deploymentHeat2 = new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1"); + ArtifactInfo deploymentHeat3 = new ArtifactInfo(null, "heatartifactname3.yaml", null, "heatartifactname3", ArtifactTypeEnum.HEAT.getType(), "1"); - ArtifactInfo deploymentHeatVol1 = new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1"); - ArtifactInfo deploymentHeatVol2 = new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1"); + ArtifactInfo deploymentHeatVol1 = new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1"); + ArtifactInfo deploymentHeatVol2 = new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1"); List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(deploymentHeat1); @@ -485,12 +484,12 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { deploymentArtifacts.add(deploymentHeatVol1); deploymentArtifacts.add(deploymentHeatVol2); - ArtifactInfo infoGuide1 = new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1"); - ArtifactInfo infoGuide2 = new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1"); + ArtifactInfo infoGuide1 = new ArtifactInfo(null, "GuideInfoArtifact1.yml", null, "GuideInfoArtifact1", ArtifactTypeEnum.GUIDE.getType(), "1"); + ArtifactInfo infoGuide2 = new ArtifactInfo(null, "GuideInfoArtifact2.yml", null, "GuideInfoArtifact2", ArtifactTypeEnum.GUIDE.getType(), "1"); - ArtifactInfo infoOther1 = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); - ArtifactInfo infoOther2 = new ArtifactInfo(null, "artifactname2.txt", null, "artifactname2", ArtifactTypeEnum.OTHER.getType(), "1"); - ArtifactInfo infoOther3 = new ArtifactInfo(null, "artifactname3.txt", null, "artifactname3", ArtifactTypeEnum.OTHER.getType(), "1"); + ArtifactInfo infoOther1 = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); + ArtifactInfo infoOther2 = new ArtifactInfo(null, "artifactname2.txt", null, "artifactname2", ArtifactTypeEnum.OTHER.getType(), "1"); + ArtifactInfo infoOther3 = new ArtifactInfo(null, "artifactname3.txt", null, "artifactname3", ArtifactTypeEnum.OTHER.getType(), "1"); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(infoGuide1); @@ -513,8 +512,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { deploymentArtifactsNotExist.add(deploymentHeat2); deploymentArtifacts.remove(deploymentHeat1); deploymentArtifacts.remove(deploymentHeat2); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname4.yaml", null, "heatartifactname4", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname5.yaml", null, "heatartifactname5", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname4.yaml", null, "heatartifactname4", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname5.yaml", null, "heatartifactname5", ArtifactTypeEnum.HEAT.getType(), "1")); deploymentHeatVol1.setArtifactVersion("2"); deploymentHeatVol2.setArtifactVersion("2"); @@ -525,8 +524,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { informationalArtifactsNotExist.add(infoOther2); informationalArtifacts.remove(infoGuide2); informationalArtifacts.remove(infoOther2); - informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact3.yml", null, "GuideInfoArtifact3", ArtifactTypeEnum.GUIDE.getType(), "1")); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname4.txt", null, "artifactname4", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "GuideInfoArtifact3.yml", null, "GuideInfoArtifact3", ArtifactTypeEnum.GUIDE.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname4.txt", null, "artifactname4", ArtifactTypeEnum.OTHER.getType(), "1")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, informationalArtifacts, deploymentArtifactsNotExist, informationalArtifactsNotExist); } @@ -538,11 +537,10 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { public void updateWithExistedDeploymentArtifactByArtifactWithDifferentType() throws Exception { String folder ="US825779"; String fileName = "ImportTC1444206.csar"; - List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -571,11 +569,11 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String fileName = "ImportTC1444207.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, informationalArtifacts); @@ -595,14 +593,14 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { // US825779 - Story: [BE] Import VSP - VF informational artifacts - Update // TC1444208 - Update With Existed Informational Artifact By Deployment Artifact With Different Type @Test - public void updateWithExistedInformationalArtifactByDeploymentArtifactWithDifferentType() throws Exception { + public void updateWithExistedInformationalArtifactByDeploymentArtifactWithDifferentType() throws Exception { String folder ="US825779"; String fileName = "ImportTC1444208.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -679,15 +677,15 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); GeneralUIUtils.clickOnElementByTestId("breadcrumbs-button-1"); fileName = "UpdateTC1444530.csar"; - deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, deploymentArtifacts, null, null, null); } @@ -712,7 +710,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { fileName = "UpdateTC1444531.csar"; List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); - informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); + informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, fileName, null, informationalArtifacts, null, null); } @@ -724,8 +722,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String folder = "US824719"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -735,14 +733,15 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String fileName = "ImportTC1444533.csar"; String folder = "US824719"; String filePath = FileHandling.getFilePath(folder); + ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser()); ResourceUIUtils.importVfFromCsar(resourceMetaData, filePath, fileName, getUser()); String updatedCsarFileName = "UpdateTC1444533.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, updatedCsarFileName, deploymentArtifacts, null, null, null); } diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/DriverFactory.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/DriverFactory.java index 705f0decaf..fd53249ac2 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/DriverFactory.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/DriverFactory.java @@ -37,6 +37,8 @@ import org.openecomp.sdc.ci.tests.utilities.FileHandling; import org.openecomp.sdc.ci.tests.utils.Utils; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxProfile; +import org.testng.ITestContext; +import org.testng.ITestResult; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeSuite; @@ -96,7 +98,7 @@ public class DriverFactory { webDriverThread.quitDriver(); } -// MobProxy.removeAllProxyServers(); + MobProxy.removeAllProxyServers(); deleteDownloadDirs(); } diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/SetupCDTest.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/SetupCDTest.java index 820c6997f5..10ae6cba7a 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/SetupCDTest.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/SetupCDTest.java @@ -238,7 +238,7 @@ public abstract class SetupCDTest extends DriverFactory { } } - public void generateReport4Jenkins(ITestResult result, ITestContext context) { + public void generateReport4Jenkins(ITestContext context) { String suiteName = ExtentManager.getSuiteName(context); // String outputDirectory = context.getOutputDirectory(); JSONObject obj = new JSONObject(); @@ -269,16 +269,17 @@ public abstract class SetupCDTest extends DriverFactory { @AfterSuite(alwaysRun = true) - public void afterSuite(ITestResult result, ITestContext context) throws Exception { - - if (getConfig().getUseBrowserMobProxy()){ - MobProxy.getPoxyServer().stop(); - } + + public void afterSuite2() throws Exception { +// public void afterSuite() throws Exception { csvReport.closeFile(); - generateReport4Jenkins(result, context); + generateReport4Jenkins(myContext); RestCDUtils.deleteOnDemand(); + if (getConfig().getUseBrowserMobProxy()){ + MobProxy.getPoxyServer().stop(); + } } protected static String setUrl() { @@ -299,7 +300,7 @@ public abstract class SetupCDTest extends DriverFactory { } File credentialsFileRemote = new File(FileHandling.getBasePath() + File.separator + "conf" + File.separator + CREDENTIALS_FILE); // File credentialsFileLocal = new File(FileHandling.getConfFilesPath() + CREDENTIALS_FILE); - File credentialsFileLocal = new File(FileHandling.getSdcVncPath() + File.separator + "conf" + File credentialsFileLocal = new File(FileHandling.getSdcVnfsPath() + File.separator + "conf" + File.separator + CREDENTIALS_FILE); File[] credentialFiles = {credentialsFileRemote, credentialsFileLocal}; for (File credentialsFile : credentialFiles){ diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/CompositionPage.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/CompositionPage.java index 496c537d49..264971e2d9 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/CompositionPage.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/CompositionPage.java @@ -146,7 +146,7 @@ public class CompositionPage extends GeneralPageElements { public static List<WebElement> getOpenTabTitle() throws Exception{ // return GeneralUIUtils.getElementsByCSS("expand-collapse span"); - return GeneralUIUtils.getElementsByCSS("expand-collapse"); + return GeneralUIUtils.getElementsByCSS("expand-collapse ng-transclude"); } public static void clickOnTab(DataTestIdEnum.CompositionScreenEnum tabSelector) throws Exception{ diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/FileHandling.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/FileHandling.java index a83e26d980..3c141d3a43 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/FileHandling.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/FileHandling.java @@ -109,12 +109,10 @@ public class FileHandling { return System.getProperty("user.dir") + File.separator; } - public static String getSdcVncPath() { - return Paths.get(System.getProperty("user.dir"), "..", "..", "sdc-vnfs").toString(); + public static String getSdcVnfsPath() { + return getBasePath() + Paths.get("..", "..", "sdc-vnfs").toString(); } - - public static String getDriversPath() { return getBasePath() + "src" + File.separator + "main" + File.separator + "resources" + File.separator + "ci" + File.separator + "drivers" + File.separator; @@ -124,8 +122,7 @@ public class FileHandling { // return getBasePath() + "src" + File.separator + "main" + File.separator + "resources" // + File.separator + "Files" + File.separator; - return getSdcVncPath()+ File.separator + "ui-tests" - + File.separator + "Files" + File.separator; + return getSdcVnfsPath()+ File.separator + "ui-tests" + File.separator + "Files" + File.separator; } public static String getResourcesEnvFilesPath() { @@ -182,6 +179,30 @@ public class FileHandling { return null; } + public static List<String> filterFileNamesListFromFolder(String filepath, String extension) { + try { + File dir = new File(filepath); + List<String> filenames = new ArrayList<String>(); + + FilenameFilter extensionFilter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.endsWith(extension); + } + }; + + if (dir.isDirectory()) { + for (File file : dir.listFiles(extensionFilter)) { + filenames.add(file.getName()); + } + return filenames; + } + + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + public static String[] getArtifactsFromZip(String filepath, String zipFilename){ try{ ZipFile zipFile = new ZipFile(filepath + File.separator + zipFilename); @@ -214,8 +235,12 @@ public class FileHandling { } - public static Object[] getZipFileNamesFromFolder(String filepath) { - return filterFileNamesFromFolder(filepath, ".zip"); +// public static Object[] getZipFileNamesFromFolder(String filepath) { +// return filterFileNamesFromFolder(filepath, ".zip"); +// } + + public static List<String> getZipFileNamesFromFolder(String filepath) { + return filterFileNamesListFromFolder(filepath, ".zip"); } public static int countFilesInZipFile(String[] artifactsArr, String reqExtension){ diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java index 19c2242550..44ff08938a 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.ci.tests.utilities; -import java.awt.AWTException; import java.awt.Robot; import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java index 33b9f4a77e..eed4f765c5 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java @@ -399,6 +399,7 @@ public class OnboardingUtils { jObject.put("name", "xyz"); jObject.put("description", "new vendor license feature groups"); jObject.put("partNumber", "123abc456"); + jObject.put("manufacturerReferenceNumber", "5"); jObject.put("addedLicenseKeyGroupsIds", Arrays.asList(licenseKeyGroupId).toArray()); jObject.put("addedEntitlementPoolsIds", Arrays.asList(entitlementPoolId).toArray()); @@ -514,7 +515,7 @@ public class OnboardingUtils { return new Pair<RestResponse, Map<String, String>>(response, vspMetadta); } - public static RestResponse getVendorSoftwareProduct(Map vspObject, User user) throws Exception { +/* public static RestResponse getVendorSoftwareProduct(Map vspObject, User user) throws Exception { Config config = Utils.getConfig(); String url = String.format("http://%s:%s/onboarding-api/v1.0/vendor-software-products/" + vspObject.get("vspId"), config.getCatalogBeHost(), config.getCatalogBePort()); @@ -527,7 +528,7 @@ public class OnboardingUtils { RestResponse response = http.httpsSendGet(url, headersMap); return response; - } + }*/ public static RestResponse validateUpload(String vspid, User user) throws Exception { Config config = Utils.getConfig(); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java index e4c4840450..4035ef9243 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java @@ -81,7 +81,7 @@ public class ServiceVerificator { } JSONObject jsonResource = (JSONObject) JSONValue.parse(responseAfterDrag); int size = ((JSONArray) jsonResource.get("componentInstances")).size(); - assertTrue(size == numOfVFC); + assertTrue(size == numOfVFC, "Expected number of componenet instances is " + numOfVFC + ", but actual is " + size); ExtentTestActions.log(Status.INFO, "The number of components on the canvas was verified."); } @@ -145,10 +145,10 @@ public class ServiceVerificator { public static void verifyOpenTabTitle(DataTestIdEnum.CompositionScreenEnum currentTab) throws Exception{ List<String> expectedTitles = new ArrayList<String>(); for(String expectedTitle: currentTab.getTitle()){ - expectedTitles.add(expectedTitle); + expectedTitles.add(expectedTitle.toLowerCase()); } for (WebElement actualTitle: CompositionPage.getOpenTabTitle()){ - int indexOfTitle = expectedTitles.indexOf(actualTitle.getText()); + int indexOfTitle = expectedTitles.indexOf(actualTitle.getText().trim().toLowerCase()); assertTrue(indexOfTitle >= 0, "Wrong title"); expectedTitles.remove(indexOfTitle); } diff --git a/ui-ci/src/main/resources/ci/conf/attsdc.yaml b/ui-ci/src/main/resources/ci/conf/attsdc.yaml index 1ab581cada..4dd7e75abd 100644 --- a/ui-ci/src/main/resources/ci/conf/attsdc.yaml +++ b/ui-ci/src/main/resources/ci/conf/attsdc.yaml @@ -1,7 +1,12 @@ outputFolder: target reportName: index.html -catalogBeHost: 127.0.0.1 -catalogFeHost: fehost +#catalogBeHost: 127.0.0.1 +#Automate +#catalogBeHost: 135.63.125.67 +#catalogFeHost: 135.63.125.63 +#IFT +catalogBeHost: 135.21.143.248 +catalogFeHost: 135.21.125.96 esHost: eshost disributionClientHost: disClient catalogFePort: 8181 @@ -12,7 +17,9 @@ neoHost: neoHost neoPort: 7474 neoDBusername: neo4j neoDBpassword: 123456 -url: http://localhost:8285/sdc1 +#url: http://localhost:8285/sdc1 +#url: https://www.e-access.att.com/QA-AUTOMATE1/sdc1/portal +url: https://www.e-access.att.com/AA-IFT-testing/sdc1/portal remoteTestingMachineIP: 0.0.0.0 remoteTestingMachinePort: 5566 remoteTesting: false diff --git a/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh b/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh index 396c1aa0ac..a113c54e60 100644 --- a/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh +++ b/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh @@ -3,7 +3,7 @@ REPORT_NAME=$1 VERSION=$2 ENV=$3 -IP=$3 + if [ -z "$REPORT_NAME" ] then @@ -20,6 +20,10 @@ if [ -z "$REPORT_NAME" ] fi +source conf/attInternal.info +IP=$automationResutlsRepo +PASS=$automationResutlsRepoPass + /usr/bin/expect << EOF spawn ssh admin@${IP} mkdir -p -m 775 /home/admin/reports/${ENV}/${VERSION}/UI/ @@ -29,13 +33,13 @@ expect { exp_continue } -re ".*sword.*" { - exp_send "Aa123456\r" + exp_send ${PASS}\r } } expect eof -spawn scp -pr ExtentReport admin@{IP}:/home/admin/reports/${ENV}/${VERSION}/UI/${REPORT_NAME}/ +spawn scp -pr ExtentReport admin@${IP}:/home/admin/reports/${ENV}/${VERSION}/UI/${REPORT_NAME}/ expect { -re ".*es.*o.*" { @@ -43,7 +47,7 @@ expect { exp_continue } -re ".*sword.*" { - exp_send "Aa123456\r" + exp_send ${PASS}\r } } diff --git a/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml index da2bc98ebc..36993e382c 100644 --- a/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml +++ b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml @@ -9,6 +9,8 @@ <class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard"> <methods> <exclude name="onboardVNFTestSanity"/> + <exclude name="onboardVNFShotFlow"/> + <exclude name="onboardRandomVNFsTest"/> </methods> </class> <class name="org.openecomp.sdc.ci.tests.execute.sanity.CatalogLeftPanelTest"/> diff --git a/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml index a49c8a751c..c55da4274c 100644 --- a/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml +++ b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml @@ -1,16 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2"> -<parameter name="makeDistribution" value="true"/> - <test name="Onboarding"> + <parameter name="makeDistribution" value="true"/> + + <test name="uiSanity"> <classes> <class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard"> <methods> - <include name="onboardVNFTest"/> + <exclude name="onboardVNFTestSanity"/> + <exclude name="onboardVNFShotFlow"/> + <exclude name="onboardRandomVNFsTest"/> </methods> </class> + </classes> </test> <!-- uitests --> </suite> <!-- uisuite -->
\ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/onboardingVNFsShortFlow.xml b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFsShortFlow.xml new file mode 100644 index 0000000000..4a4628a9ed --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFsShortFlow.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> +<suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2"> + <parameter name="makeDistribution" value="true"/> + + <test name="uiSanity"> + <classes> + + <class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard"> + <methods> + <include name="onboardVNFShotFlow"/> + </methods> + </class> + + + </classes> + </test> <!-- uitests --> +</suite> <!-- uisuite -->
\ No newline at end of file |