Skip to content

Commit

Permalink
Merge pull request mosip#1019 from mohanachandran-s/patch-2
Browse files Browse the repository at this point in the history
MOSIP-37793 - Updated the Readme file
  • Loading branch information
ckm007 authored Nov 29, 2024
2 parents f8d1c21 + 81e5a59 commit 08d9be8
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions api-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,30 @@

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:

- **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

Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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.<env_name> -Denv.endpoint=<base_env> -Denv.testLevel=smokeAndRegression -jar apitest-esignet-1.5.0-SNAPSHOT-jar-with-dependencies.jar
java -jar -Dmodules=esignet -Denv.user=api-internal.<env_name> -Denv.endpoint=<base_env> -Denv.testLevel=smokeAndRegression -jar apitest-esignet-1.2.1-SNAPSHOT-jar-with-dependencies.jar
```

# Using Eclipse IDE
Expand Down Expand Up @@ -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 `<env_name>` with the appropriate environment name (e.g., `dev`, `qa`, etc.).
- **env.endpoint**: The environment where the application under test is deployed. Replace `<base_env>` with the correct base URL for the environment (e.g., `https://api-internal.<env_name>.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]
This project is licensed under the terms of the [Mozilla Public License 2.0](https://github.com/mosip/mosip-platform/blob/master/LICENSE)

0 comments on commit 08d9be8

Please sign in to comment.