From f7c16da237d5063637479618e816e5f439a13451 Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:40:40 +0530 Subject: [PATCH 1/2] MOSIP-37793 - Updated the Readme file Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- api-test/README.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/api-test/README.md b/api-test/README.md index 0a0dff0860..2fbf1d63bb 100644 --- a/api-test/README.md +++ b/api-test/README.md @@ -4,15 +4,21 @@ The **Masterdata API Test Rig** is designed for the execution of module-wise automation API tests for the admin services. This test rig utilizes **Java REST Assured** and **TestNG** frameworks to automate testing of the masterdata(admin-services) API functionalities. The key focus is to validate the device creation, registration center creation, zone creation, machine creation and related functionalities provided by the admin service module. +--- + ## Test Categories - **Smoke**: Contains only positive test scenarios for quick verification. - **Regression**: Includes all test scenarios, covering both positive and negative cases. +--- + ## Coverage This test rig covers only **external API endpoints** exposed by the admin services module. +--- + ## Pre-requisites Before running the automation tests, ensure the following software is installed on the machine: @@ -20,6 +26,8 @@ Before running the automation tests, ensure the following software is installed - **Java 21** (or a compatible version) - **Maven 3.9.6** (or higher) - **Lombok** (Refer to [Lombok Project](https://projectlombok.org/)) +- **setting.xml** ([download here](https://github.com/mosip/mosip-functional-tests/blob/master/settings.xml)) +- **apitest-commons** library should be cloned and the JAR should be built. Refer to ([README](https://github.com/mosip/mosip-functional-tests/blob/release-1.3.0/apitest-commons/README.md)) ### For Windows @@ -32,6 +40,8 @@ Before running the automation tests, ensure the following software is installed - In the regular Maven configuration folder (`/conf`) - Under `/usr/local/maven/conf/` +--- + ## Access Test Automation Code You can access the test automation code using either of the following methods: @@ -51,6 +61,8 @@ You can access the test automation code using either of the following methods: git clone https://github.com/mosip/admin-services ``` +--- + ## Build Test Automation Code Once the repository is cloned or downloaded, follow these steps to build and install the test automation code: @@ -67,6 +79,8 @@ Once the repository is cloned or downloaded, follow these steps to build and ins This will download the required dependencies and prepare the test suite for execution. +--- + ## Execute Test Automation Suite You can execute the test automation code using either of the following methods: @@ -114,7 +128,7 @@ To execute the tests using Eclipse IDE, use the following steps: - Go to `Run` > `Run Configurations`. - In the **Run Configurations** window, create a new configuration for your tests: - Right-click on **Java Application** and select **New**. - - In the **Main** tab, select the project by browsing the location where the `api-test` folder is saved, and select the **Main class** as `io.mosip.testrig.apirig.esignet.testrunner.MosipTestRunner`. + - In the **Main** tab, select the project by browsing the location where the `api-test` folder is saved, and select the **Main class** as `io.mosip.testrig.apirig.masterdata.testrunner.MosipTestRunner`. - In the **Arguments** tab, add the necessary **VM arguments**: - **VM Arguments**: ``` @@ -131,22 +145,24 @@ To execute the tests using Eclipse IDE, use the following steps: - After the tests are executed, you can view the detailed results in the `api-test\testng-report` directory. +--- - -### Details of Arguments Used +## Details of Arguments Used - **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-masterdata-1.3.0-SNAPSHOT-jar-with-dependencies.jar`. -## Build and Run +### Build and Run Info To run the tests for both **Smoke** and **Regression**: 1. Ensure the correct environment and test level parameters are set. 2. Execute the tests as shown in the command above to validate admin services API functionalities. +--- + ## License This project is licensed under the terms of the [Mozilla Public License 2.0] From a8452a8e2718bb00c4842b6dd5b05f5fae48fda5 Mon Sep 17 00:00:00 2001 From: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:12:28 +0530 Subject: [PATCH 2/2] Update README.md Signed-off-by: Mohanachandran S <165888272+mohanachandran-s@users.noreply.github.com> --- api-test/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-test/README.md b/api-test/README.md index 2fbf1d63bb..aa56942cc5 100644 --- a/api-test/README.md +++ b/api-test/README.md @@ -165,4 +165,4 @@ To run the tests for both **Smoke** and **Regression**: ## License -This project is licensed under the terms of the [Mozilla Public License 2.0] +This project is licensed under the terms of the [Mozilla Public License 2.0](https://github.com/mosip/mosip-platform/blob/master/LICENSE)