Skip to content
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5268e33
changed to constants in SingleModLibertyLSTestCommon and SingleModJak…
anusreelakshmi934 Dec 17, 2024
1e62f89
SingleModMPLSTestCommon file
anusreelakshmi934 Dec 17, 2024
02c2113
SingleModMPProjectTestCommon file
anusreelakshmi934 Dec 17, 2024
da9f216
SingleModNLTRestProjectTestCommon file
anusreelakshmi934 Dec 17, 2024
daa7096
modified other strings to constants
anusreelakshmi934 Dec 17, 2024
769d3d3
Moved into constants file under the test directory
anusreelakshmi934 Dec 19, 2024
fcac98e
Changed copyright year
anusreelakshmi934 Jan 2, 2025
02a2265
copyright header added
anusreelakshmi934 Jan 2, 2025
ce62614
SingleModJakartaLSTestCommon class
anusreelakshmi934 Jan 8, 2025
42261b6
SingleModLibertyLSTestCommon class
anusreelakshmi934 Jan 8, 2025
4fc023b
SingleModMPLSTestCommon class
anusreelakshmi934 Jan 8, 2025
92e9776
SingleModNLTRestProjectTestCommon class
anusreelakshmi934 Jan 8, 2025
2bf831c
TestUtils class
anusreelakshmi934 Jan 8, 2025
0618396
Update ItConstants.java
anusreelakshmi934 Jan 8, 2025
0588eba
changed the path to / seperated
anusreelakshmi934 Jan 13, 2025
b34d02a
SingleModMPLSTestCommon class updated
anusreelakshmi934 Jan 13, 2025
4761fe1
SingleModLibertyLSTestCommon updated
anusreelakshmi934 Jan 13, 2025
698703d
SingleModMPLSTestCommon updated
anusreelakshmi934 Jan 13, 2025
6f5f2f5
removed extra imports
anusreelakshmi934 Jan 13, 2025
97eac05
messages.log path
anusreelakshmi934 Jan 15, 2025
e64cdbd
path changed to string array
anusreelakshmi934 Jan 17, 2025
64b7a81
Update Constants.java
anusreelakshmi934 Jan 17, 2025
f1d400d
Update SingleModMPLSTestCommon.java
anusreelakshmi934 Jan 17, 2025
31ca81d
addressed review comments
anusreelakshmi934 Jan 22, 2025
3f1b7b3
Updates
anusreelakshmi934 Jan 23, 2025
229e73e
Changed into String[]
anusreelakshmi934 Jan 23, 2025
41a8522
server.env added to path
anusreelakshmi934 Jan 24, 2025
682853c
imported static Itconstants
anusreelakshmi934 Jan 24, 2025
25a376e
Dynamically combine paths and project name
anusreelakshmi934 Jan 31, 2025
f879f81
resolved merge conflicts
anusreelakshmi934 Mar 4, 2025
96f0bb8
child classes modified
anusreelakshmi934 Mar 6, 2025
72b8371
header updated
anusreelakshmi934 Mar 10, 2025
d701be1
Merge branch 'main' into constants#1153
anusreelakshmi934 Apr 7, 2025
7e757c1
Merge remote-tracking branch 'upstream/main' into constants#1153
anusreelakshmi934 Nov 13, 2025
ead4c41
Merge remote-tracking branch 'upstream/main' into constants#1153
anusreelakshmi934 Dec 5, 2025
d75a708
spacing
anusreelakshmi934 Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 IBM Corporation.
* Copyright (c) 2023, 2025 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,17 +13,19 @@

import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

public class GradleSingleModJakartaLSTest extends SingleModJakartaLSTestCommon {

/**
* Application Name
*/
public static String PROJECT_NAME = "sampleGradleMPLSApp";
public static String PROJECT_NAME = GRADLE_MPLS_PROJECT;

/**
* The path to the folder containing the test projects.
*/
public static String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
public static String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* Application resoruce URL.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 IBM Corporation.
* Copyright (c) 2023, 2025 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,17 +13,19 @@

import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

public class GradleSingleModLSTest extends SingleModLibertyLSTestCommon {

/**
* Application Name
*/
public static String PROJECT_NAME = "singleModGradleMP";
public static String PROJECT_NAME = GRADLE_MP_PROJECT;

/**
* The path to the folder containing the test projects.
*/
public static String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
public static String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* Application resoruce URL.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 IBM Corporation.
* Copyright (c) 2023, 2025 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,18 +13,19 @@

import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

public class GradleSingleModMPLSTest extends SingleModMPLSTestCommon {

/**
* Application Name
*/
public static String PROJECT_NAME = "sampleGradleMPLSApp";
public static String PROJECT_NAME = GRADLE_MPLS_PROJECT;

/**
* The path to the folder containing the test projects.
*/
public static String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
public static String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* Application resoruce URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@

import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests Liberty Tools actions using a single module MicroProfile Gradle project.
*/
public class GradleSingleModMPProjectTest extends SingleModMPProjectTestCommon {
/**
* Single module Microprofile project name.
*/
private static final String SM_MP_PROJECT_NAME = "singleModGradleMP";
private static final String SM_MP_PROJECT_NAME = GRADLE_MP_PROJECT;

/**
* The path to the folder containing the test projects.
*/
private static final String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
private static final String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* Prepares the environment for test execution.
Expand All @@ -43,8 +45,8 @@ public static void setup() {
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
setWLPInstallPath("build");
setTestReportPath(Paths.get(getProjectsDirPath(), getSmMPProjectName(), "build", "reports", "tests", "test", "index.html"));
setBuildFileName("build.gradle");
setTestReportPath(Paths.get(getProjectsDirPath(), getSmMPProjectName(), INDEX_HTML_PATH));
setBuildFileName(GRADLE_BUILD_FILE);
setBuildFileOpenCommand("Liberty: View Gradle config");
setStartParams("--hotTests");
setStartParamsDebugPort("--libertyDebugPort=9876");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests Liberty Tools actions using a single module MicroProfile Gradle project with space in directory and name.
*/
Expand All @@ -27,22 +29,22 @@ public class GradleSingleModMPSIDProjectTest extends SingleModMPProjectTestCommo
/**
* Single module Microprofile project name specified in file settings.gradle.
*/
private static final String SM_MP_PROJECT_NAME = "singleModGradleMP";
private static final String SM_MP_PROJECT_NAME = GRADLE_MP_PROJECT;

/**
* Project name of Microprofile single module in file settings-copy.gradle.
*/
private static final String SM_MP_PROJECT_NAME_NEW = "singleMod GradleMP";
private static final String SM_MP_PROJECT_NAME_NEW = GRADLE_MP_PROJECT_WITH_SPACE;

/**
* The path to the folder containing the test projects.
*/
private static final String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
private static final String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* The path to the folder containing the test projects, including directories with spaces.
*/
private static final String PROJECTS_PATH_NEW = Paths.get("src", "test", "resources", "projects", "gradle sample").toAbsolutePath().toString();
private static final String PROJECTS_PATH_NEW = Paths.get(GRADLE_PROJECT_PATH_WITH_SPACE).toAbsolutePath().toString();

/**
* Prepares the environment for test execution.
Expand All @@ -57,13 +59,13 @@ public static void setup() {
Path projectDirPath = pathNew.resolve(SM_MP_PROJECT_NAME);

// Define paths for the original and copy of settings.gradle
Path originalPath = projectDirPath.resolve("settings.gradle");
Path originalPathCopy = projectDirPath.resolve("settings-copy.gradle");
Path originalPath = projectDirPath.resolve(SETTINGS_GRADLE);
Path originalPathCopy = projectDirPath.resolve(SETTINGS_COPY_GRADLE);

// Rename settings.gradle to settings-duplicate.gradle
Files.move(originalPath, originalPath.resolveSibling("settings-duplicate.gradle"));
Files.move(originalPath, originalPath.resolveSibling(SETTINGS_DUPLICATE_GRADLE));
// Rename settings-copy.gradle to settings.gradle
Files.move(originalPathCopy, originalPathCopy.resolveSibling("settings.gradle"));
Files.move(originalPathCopy, originalPathCopy.resolveSibling(SETTINGS_GRADLE));

Path projectDirNewPath = pathNew.resolve(SM_MP_PROJECT_NAME_NEW);

Expand Down Expand Up @@ -95,14 +97,14 @@ public static void cleanup() {
GradleSingleModMPSIDProjectTest() {
// set the new locations for the test, not the original locations
setProjectsDirPath(PROJECTS_PATH_NEW);
setTestReportPath(Paths.get(PROJECTS_PATH_NEW, SM_MP_PROJECT_NAME_NEW, "build", "reports", "tests", "test", "index.html"));
setTestReportPath(Paths.get(PROJECTS_PATH_NEW, SM_MP_PROJECT_NAME_NEW, INDEX_HTML_PATH));
setSmMPProjectName(SM_MP_PROJECT_NAME_NEW);
setBuildCategory(BuildType.GRADLE_TYPE);
setSmMpProjPort(9080);
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
setWLPInstallPath("build");
setBuildFileName("build.gradle");
setBuildFileName(GRADLE_BUILD_FILE);
setBuildFileOpenCommand("Liberty: View Gradle config");
setStartParams("--hotTests");
setStartParamsDebugPort("--libertyDebugPort=9876");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 IBM Corporation.
* Copyright (c) 2023, 2025 IBM Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -15,6 +15,8 @@

import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests that use a single module non Liberty Tools compliant REST Gradle project.
*/
Expand All @@ -23,12 +25,12 @@ public class GradleSingleModNLTRestProjectTest extends SingleModNLTRestProjectTe
/**
* The path to the folder containing the test projects.
*/
private static final String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle").toAbsolutePath().toString();
private static final String PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR).toAbsolutePath().toString();

/**
* Single module REST project that lacks the configuration to be recognized by Liberty tools.
*/
private static final String SM_NLT_REST_PROJECT_NAME = "singleModGradleRESTNoLTXmlCfg";
private static final String SM_NLT_REST_PROJECT_NAME = GRADLE_NLT_PROJECT;

/**
* Prepares the environment for test execution.
Expand All @@ -41,8 +43,8 @@ public static void setup() {
GradleSingleModNLTRestProjectTest() {
setProjectsDirPath(PROJECTS_PATH);
setSmNLTRestProjectName(SM_NLT_REST_PROJECT_NAME);
setBuildFileName("build.gradle");
setHelperFilesDirPath(Paths.get("src", "test", "resources", "files", "smNLTRestProject", "gradle").toAbsolutePath().toString());
setBuildFileName(GRADLE_BUILD_FILE);
setHelperFilesDirPath(Paths.get(NLT_GRADLE_PROJECT_PATH).toAbsolutePath().toString());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.nio.file.Path;
import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests Liberty Tools actions using multiple MicroProfile projects: one is a Gradle project, and the other is a Maven project. The tests are executed in the Maven project.
*/
Expand All @@ -24,37 +26,37 @@ public class MavenMPMultipleProjectTest extends SingleModMPProjectTestCommon {
/**
* The MicroProfile project name from the multiple projects used for running tests.
*/
private static final String MP_PROJECT_NAME = "singleModMavenMP";
private static final String MP_PROJECT_NAME = MAVEN_MP_PROJECT;

/**
* The path of the folder containing two projects.
*/
private static final String MULTIPLE_PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "multiple-project").toAbsolutePath().toString();
private static final String MULTIPLE_PROJECTS_PATH = Paths.get(MULTIPLE_PRO_FOLDER).toAbsolutePath().toString();

/**
* The original path of the parent directory that containing the test projects.
*/
private static final String MULTIPLE_PROJECTS_PATH_PARENT = Paths.get("src", "test", "resources", "projects").toAbsolutePath().toString();
private static final String MULTIPLE_PROJECTS_PATH_PARENT = Paths.get(MULTIPLE_TEST_PRO_PATH).toAbsolutePath().toString();

/**
* The original path of the gradle project.
*/
private static final String GRADLE_PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "gradle", "singleModGradleMP").toAbsolutePath().toString();
private static final String GRADLE_PROJECTS_PATH = Paths.get(GRADLE_PROJECT_PATH_STR, GRADLE_MP_PROJECT).toAbsolutePath().toString();

/**
* The original path of the maven project.
*/
private static final String MAVEN_PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "maven", "singleModMavenMP").toAbsolutePath().toString();
private static final String MAVEN_PROJECTS_PATH = Paths.get(MAVEN_PROJECT_PATH, MAVEN_MP_PROJECT).toAbsolutePath().toString();

/**
* The new path of the gradle project.
*/
private static final String GRADLE_MULTIPLE_PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "multiple-project", "singleModGradleMP").toAbsolutePath().toString();
private static final String GRADLE_MULTIPLE_PROJECTS_PATH = Paths.get(MULTIPLE_PRO_FOLDER, GRADLE_MP_PROJECT).toAbsolutePath().toString();

/**
* The new path of the maven project.
*/
private static final String MAVEN_MULTIPLE_PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "multiple-project", "singleModMavenMP").toAbsolutePath().toString();
private static final String MAVEN_MULTIPLE_PROJECTS_PATH = Paths.get(MULTIPLE_PRO_FOLDER, MAVEN_MP_PROJECT).toAbsolutePath().toString();

/**
* The paths to the integration test reports. The first is used when maven-surefire-report-plugin 3.4 is used and the second when version 3.5 is used.
Expand Down Expand Up @@ -112,14 +114,14 @@ public static void cleanup() {
MavenMPMultipleProjectTest() {
// set the new locations for the test, not the original locations
setProjectsDirPath(MULTIPLE_PROJECTS_PATH);
setTestReportPath(Paths.get(MULTIPLE_PROJECTS_PATH, MP_PROJECT_NAME, "build", "reports", "tests", "test", "index.html"));
setTestReportPath(Paths.get(MULTIPLE_PROJECTS_PATH, MP_PROJECT_NAME, INDEX_HTML_PATH));
setSmMPProjectName(MP_PROJECT_NAME);
setBuildCategory(BuildType.MAVEN_TYPE);
setSmMpProjPort(9080);
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
setWLPInstallPath(Paths.get("target", "liberty").toString());
setBuildFileName("pom.xml");
setBuildFileName(MAVEN_BUILD_FILE);
setBuildFileOpenCommand("Liberty: View pom.xml");
setStartParams("-DhotTests=true");
setStartParamsDebugPort("-DdebugPort=9876");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import java.nio.file.Path;
import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests Liberty Tools actions using a single module MicroProfile Maven project.
*/
Expand All @@ -25,12 +27,12 @@ public class MavenSingleModMPProjectTest extends SingleModMPProjectTestCommon {
/**
* Single module Microprofile project name.
*/
private static final String SM_MP_PROJECT_NAME = "singleModMavenMP";
private static final String SM_MP_PROJECT_NAME = MAVEN_MP_PROJECT;

/**
* The path to the folder containing the test projects.
*/
private static final String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "maven").toAbsolutePath().toString();
private static final String PROJECTS_PATH = Paths.get(MAVEN_PROJECT_PATH).toAbsolutePath().toString();

/**
* The paths to the integration test reports. The first is used when maven-surefire-report-plugin 3.4 is used and the second when version 3.5 is used.
Expand Down Expand Up @@ -61,8 +63,8 @@ public static void setup() {
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
setWLPInstallPath(Paths.get("target", "liberty").toString());
setTestReportPath(Paths.get(getProjectsDirPath(), getSmMPProjectName(), "build", "reports", "tests", "test", "index.html"));
setBuildFileName("pom.xml");
setTestReportPath(Paths.get(getProjectsDirPath(), getSmMPProjectName(), INDEX_HTML_PATH));
setBuildFileName(MAVEN_BUILD_FILE);
setBuildFileOpenCommand("Liberty: View pom.xml");
setStartParams("-DhotTests=true");
setStartParamsDebugPort("-DdebugPort=9876");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.nio.file.Path;
import java.nio.file.Paths;

import static io.openliberty.tools.intellij.it.Utils.ItConstants.*;

/**
* Tests Liberty Tools actions using a single module MicroProfile Maven project with space in directory name.
*/
Expand All @@ -27,17 +29,17 @@ public class MavenSingleModMPSIDProjectTest extends SingleModMPProjectTestCommon
/**
* Single module Microprofile project name.
*/
private static final String SM_MP_PROJECT_NAME = "singleModMavenMP";
private static final String SM_MP_PROJECT_NAME = MAVEN_MP_PROJECT;

/**
* The path to the folder containing the test projects.
*/
private static final String PROJECTS_PATH = Paths.get("src", "test", "resources", "projects", "maven").toAbsolutePath().toString();
private static final String PROJECTS_PATH = Paths.get(MAVEN_PROJECT_PATH).toAbsolutePath().toString();

/**
* The path to the folder containing the test projects, including directories with spaces.
*/
private static final String PROJECTS_PATH_NEW = Paths.get("src", "test", "resources", "projects", "maven sample").toAbsolutePath().toString();
private static final String PROJECTS_PATH_NEW = Paths.get(MAVEN_PROJECT_PATH_WITH_SPACE).toAbsolutePath().toString();

/**
* The paths to the integration test reports. The first is used when maven-surefire-report-plugin 3.4 is used and the second when version 3.5 is used.
Expand Down Expand Up @@ -83,14 +85,14 @@ public static void cleanup() {
MavenSingleModMPSIDProjectTest() {
// set the new locations for the test, not the original locations
setProjectsDirPath(PROJECTS_PATH_NEW);
setTestReportPath(Paths.get(PROJECTS_PATH_NEW, SM_MP_PROJECT_NAME, "build", "reports", "tests", "test", "index.html"));
setTestReportPath(Paths.get(PROJECTS_PATH_NEW, SM_MP_PROJECT_NAME, INDEX_HTML_PATH));
setSmMPProjectName(SM_MP_PROJECT_NAME);
setBuildCategory(BuildType.MAVEN_TYPE);
setSmMpProjPort(9080);
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
setWLPInstallPath(Paths.get("target", "liberty").toString());
setBuildFileName("pom.xml");
setBuildFileName(MAVEN_BUILD_FILE);
setBuildFileOpenCommand("Liberty: View pom.xml");
setStartParams("-DhotTests=true");
setStartParamsDebugPort("-DdebugPort=9876");
Expand Down
Loading
Loading