diff --git a/api-test/README.md b/api-test/README.md index 21b3435b1..735dcb15b 100644 --- a/api-test/README.md +++ b/api-test/README.md @@ -4,15 +4,21 @@ The **eSignet API Test Rig** is designed for the execution of module-wise automation API tests for the eSignet service. This test rig utilizes **Java REST Assured** and **TestNG** frameworks to automate testing of the eSignet API functionalities. The key focus is to validate the authentication, signature generation, and related functionalities provided by the eSignet 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 eSignet 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/esignet ``` +--- + ## 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: @@ -82,7 +96,7 @@ To execute the tests using Jar, use the following steps: 2. Run the automation test suite JAR file: ``` - java -jar -Dmodules=esignet -Denv.user=api-internal. -Denv.endpoint= -Denv.testLevel=smokeAndRegression -jar apitest-esignet-1.5.0-SNAPSHOT-jar-with-dependencies.jar + java -jar -Dmodules=esignet -Denv.user=api-internal. -Denv.endpoint= -Denv.testLevel=smokeAndRegression -jar apitest-esignet-1.2.1-SNAPSHOT-jar-with-dependencies.jar ``` # Using Eclipse IDE @@ -130,23 +144,28 @@ To execute the tests using Eclipse IDE, use the following steps: ## 6. **View Test Results** - After the tests are executed, you can view the detailed results in the `api-test\testng-report` directory. + - Two reports will gets generated + - First report is for pre-requisite testcases + - Second report is for core testcases - - -### 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-esignet-1.5.0-SNAPSHOT-jar-with-dependencies.jar`. +- **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-esignet-1.2.1-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 eSignet's API functionalities. +--- + ## License -This project is licensed under the terms of the [Mozilla Public License 2.0] \ No newline at end of file +This project is licensed under the terms of the [Mozilla Public License 2.0](https://github.com/mosip/mosip-platform/blob/master/LICENSE)