aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests/src/test/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-09-01 23:47:27 +0200
committerSébastien Determe <sebastien.determe@intl.att.com>2020-09-02 15:06:30 +0000
commit5b05708e3dec3200eb0d996e45c76a049038ca09 (patch)
treef494c49a6da6c64ef5ec8747a84329f76200ae08 /integration-tests/src/test/java
parent1ec3dde2067e0181faa8e5098219c93126638aef (diff)
Optimize Build
Optimize the time required to compute the tests so that the build can be faster Issue-ID: SDC-3232 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I0ccbc3a0f9d895e75dcf5e4c1ef35ebf3ba06808 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'integration-tests/src/test/java')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java10
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java2
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java8
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/FileHandling.java2
4 files changed, 12 insertions, 10 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java
index 71c8db0f8e..985d161dd6 100644
--- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java
+++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -68,7 +68,7 @@ public abstract class ComponentBaseTest {
protected static Logger logger = LogManager.getLogger(ComponentBaseTest.class);
- protected static final String REPORT_FOLDER = "target" + File.separator + "ExtentReport" + File.separator;
+ protected static final String REPORT_FOLDER = "target" + File.separator + "ExtentReport" + File.separator + "API" + File.separator;
private static final String REPORT_FILE_NAME = "SDC_CI_Extent_Report.html";
public static Config config;
protected static ITestContext myContext;
@@ -108,7 +108,7 @@ public abstract class ComponentBaseTest {
@BeforeMethod(alwaysRun = true)
public void setupBeforeTest(java.lang.reflect.Method method, ITestContext context) throws Exception {
if (!"onboardVNFShotFlow".equals(method.getName()) &&
- !"onboardPNFFlow".equals(method.getName()) ) {
+ !"onboardPNFFlow".equals(method.getName())) {
logger.info("ExtentReport instance started from BeforeMethod...");
ExtentTestManager.startTest(method.getName());
ExtentTestManager.assignCategory(this.getClass());
@@ -186,7 +186,7 @@ public abstract class ComponentBaseTest {
List<String> genericCollection = new ArrayList<>();
- if(resourcesArrayList.get(0) != null) {
+ if (resourcesArrayList.get(0) != null) {
ComponentTypeEnum componentTypeEnum = resourcesArrayList.get(0).getComponentType();
resourcesArrayList.stream().filter(Objects::nonNull).
filter(s -> s.getName().toLowerCase().startsWith("ci") && !s.getName().toLowerCase().equals("cindervolume")).
diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java
index 5cb55fd91c..19533e90f1 100644
--- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java
+++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java
@@ -312,7 +312,7 @@ public class FileHandling {
public static void createDirectory(String directoryPath) {
File directory = new File(String.valueOf(directoryPath));
if (! directory.exists()){
- directory.mkdir();
+ directory.mkdirs();
}
}
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java
index 9f5a7cc7cd..18b5a71061 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/setup/SetupCDTest.java
@@ -24,11 +24,13 @@ import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import com.aventstack.extentreports.ExtentTest;
import com.aventstack.extentreports.Status;
+
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.UUID;
+
import net.lightbody.bmp.core.har.Har;
import org.json.simple.JSONObject;
import org.onap.sdc.backend.ci.tests.config.UserCredentialsFromFile;
@@ -75,7 +77,7 @@ public abstract class SetupCDTest extends DriverFactory {
private static final String CREDENTIALS_FILE = "credentials.yaml";
private static final String REPORT_FILE_NAME = "SDC_UI_Extent_Report.html";
- private static final String REPORT_FOLDER = "target" + File.separator + "ExtentReport" + File.separator;
+ private static final String REPORT_FOLDER = "target" + File.separator + "ExtentReport" + File.separator + "UI" + File.separator;
private static final String SCREENSHOT_FOLDER = REPORT_FOLDER + "screenshots" + File.separator;
private static final String HAR_FILES_FOLDER_NAME = "har_files";
private static final String HAR_FILES_FOLDER = REPORT_FOLDER + HAR_FILES_FOLDER_NAME + File.separator;
@@ -392,7 +394,7 @@ public abstract class SetupCDTest extends DriverFactory {
private void loginWithUser(final UserRoleEnum role) {
try {
final String msg = String
- .format("Login as user '%s', role '%s'", role.getUserId(), role.getUserRole());
+ .format("Login as user '%s', role '%s'", role.getUserId(), role.getUserRole());
getExtendTest().log(Status.INFO, msg);
LOGGER.info(msg);
loginToSystem(role);
@@ -423,7 +425,7 @@ public abstract class SetupCDTest extends DriverFactory {
LOGGER.info(String.format("Setup before test for role '%s'", role.name()));
if (!getWindowTest().getPreviousRole().equalsIgnoreCase(role.name())) {
LOGGER.info(String.format("Logging in with new role '%s'. Previous role was: '%s'.", role.name(),
- getWindowTest().getPreviousRole()));
+ getWindowTest().getPreviousRole()));
navigateAndLogin(role);
}
}
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/FileHandling.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/FileHandling.java
index bb058e4fca..b7f199d1b8 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/FileHandling.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/FileHandling.java
@@ -304,7 +304,7 @@ public class FileHandling {
public static void createDirectory(String directoryPath) {
File directory = new File(String.valueOf(directoryPath));
if (!directory.exists()) {
- directory.mkdir();
+ directory.mkdirs();
}
}