From c995da056f7df7f67f6bd6aaf73ac0b9ee877a45 Mon Sep 17 00:00:00 2001 From: Mohanachandran S Date: Fri, 16 Oct 2026 17:47:03 +0530 Subject: [PATCH] MOSIP-45683 - Removed hardcoded version from JAR name and run instructions Co-Authored-By: Claude Opus 5.5 Signed-off-by: Mohanachandran S --- api-test/README.md | 9 +++++++-- api-test/pom.xml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api-test/README.md b/api-test/README.md index 08d22cf4d2..63ddf5f30c 100644 --- a/api-test/README.md +++ b/api-test/README.md @@ -103,8 +103,13 @@ To execute the tests using Jar, use the following steps: ``` 2. Run the automation test suite JAR file: + ```sh + # Linux / macOS / Git Bash + java -Dmodules=prereg -Denv.user=api-internal. -Denv.endpoint= -Denv.testLevel=smokeAndRegression -jar apitest-prereg-*-jar-with-dependencies.jar ``` - java -jar -Dmodules=prereg -Denv.user=api-internal. -Denv.endpoint= -Denv.testLevel=smokeAndRegression -jar apitest-prereg-1.2.1-SNAPSHOT-jar-with-dependencies.jar + ```powershell + # Windows PowerShell (does not expand * for java, so resolve the file first) + java -Dmodules=prereg -Denv.user=api-internal. -Denv.endpoint= -Denv.testLevel=smokeAndRegression -jar (Get-ChildItem apitest-prereg-*-jar-with-dependencies.jar).Name ``` # Using Eclipse IDE @@ -178,7 +183,7 @@ This section describes the meaning of each column in the test report: - **env.user**: Replace `` with the appropriate environment name (e.g., `dev`, `qa`, etc.). - **env.endpoint**: The environment where the application under test is deployed. Replace `` with the correct base URL for the environment (e.g., `https://api-internal..mosip.net`). - **env.testLevel**: Set this to `smoke` to run only smoke test cases, or `smokeAndRegression` to run both smoke and regression tests. -- **jar**: Specify the name of the JAR file to execute. The version will change according to the development code version. For example, the current version may look like `apitest-prereg-1.2.1-SNAPSHOT-jar-with-dependencies.jar`. +- **jar**: The JAR built in `target/`, named `apitest-prereg--jar-with-dependencies.jar`, where `` is the `` in `pom.xml`. The `apitest-prereg-*-jar-with-dependencies.jar` pattern above picks it up, so the command does not change when the version does. ### Build and Run Info diff --git a/api-test/pom.xml b/api-test/pom.xml index f4b8d1fd44..e97be06b18 100644 --- a/api-test/pom.xml +++ b/api-test/pom.xml @@ -62,7 +62,7 @@ 0.7.0 3.0.1 - apitest-prereg-1.4.0-SNAPSHOT-jar-with-dependencies + ${project.artifactId}-${project.version}-jar-with-dependencies