v1.3.2
Release Name: API Test Commons Releases
Release version: v1.3.2
Release Date: 27th March, 2025
Overview
The v1.3.2 release of API Test Commons introduces new developments, enhancements, security fixes, and bug resolutions to improve the efficiency, usability, and security of the MOSIP Functional Tests. This update includes significant improvements in YAML loading, test efficiency, report generation, and dependency management. Additionally, it introduces new methods for eKYC data decryption and Inji Verify backend services support.
Major Highlights
New Development
Support for Inji Verify Api Testrig
Introduced supporting methods for Inji Verify, a new api testrig designed to test the Inji Verify backend services.
These methods have been integrated into API Test Commons.
New Method for eKYC Data Decryption for DSL
Implemented ekycDataDecryption, a method that decrypts eKYC data using AES-GCM encryption.
Extracts encrypted identity and session key from the provided JSON object.
Retrieves the corresponding private key for the given partner and decrypts the session key.
Uses the decrypted session key to decrypt the eKYC data and return a plain-text result.
Enhancements
Report Enhancements
Corrected width size mismatch in the report layout.
Removed the test case name column from the report summary, combining the test case name and test case number into a single column.
Commons Cleanup
Removed unnecessary folders, files, and unused URLs.
Cleaned up unused configuration properties.
Moved component-specific code into respective test rig modules.
Enhancing YAML Loading and Test Efficiency
Ordered YAML Data: Ensured that YAML data maintains its original order by using LinkedHashMap when loading YAML files.
Consistent Test Filtering: Fixed an issue where smoke test results appeared in a random order, ensuring consistent ordering.
Efficient Test Case Storage: Switched from a slower test case storage method to an optimized ArrayList implementation.
Auto-Generated ID Handling
Updated logic to write auto-generated IDs directly into a global map instead of storing them in a file.
Enhanced the writeAutoGeneratedId method to handle responses without the keyword responses.
Security Fixes
Set the log level for classes printing secrets in logs to prevent accidental exposure of sensitive information.
Added new configuration properties in kernel.properties:
pms_db_schema=pms
expirationTime=120 (value in seconds)
Dependency Updates & Fixes
Upgraded multiple dependencies to fix dependent bot issues.
Logic Introduced for Adding Expiry Time to Transaction
The expiry time is now determined based on the expirationTime value provided in the configuration property.
Expiry timestamps are generated in UTC format.
The default expiration is set to 2 minutes, configurable through the config property.
During test execution, the expiry time is dynamically inserted into API requests using the keyword
$EXPIRYTIMESTAMP$
.
Bug Fixes
Updated OTP fetching logic to remove the pre-plus sign (+) from phone numbers when retrieving OTP from the OTP listener.
Set serverErrorsToMonitor default value as empty to avoid conflicts across different modules.
Introduced moduleNamePattern in kernel.properties, centralizing the module name property for easy retrieval across all modules.
Conclusion
The v1.3.2 release of API Test Commons brings crucial updates to enhance the API testing framework’s functionality, security, and performance. By introducing improved YAML handling, auto-generated ID management, transaction expiry logic, and security improvements, this release ensures a more robust and efficient testing experience for MOSIP Functional Tests.
Pre-requisites
Ensure the following software is installed on the machine from where the automation tests will be executed:
Java 21
Maven 3.9.6 or higher
Lombok (Refer to Lombok Project)
For Windows
Git Bash 2.18.0 or higher
settings.xml needs to be present in the .m2 folder.
For Linux
settings.xml file needs to be present in two places:
Regular Maven conf folder
Copy the same settings.xml under /usr/local/maven/conf
Access Test Automation Code
1. From Browser
Clone or download the repository as a zip file from GitHub.
Unzip the contents.
Continue with the steps below from a terminal (Linux) or command prompt (Windows).
2. From Git Bash
Copy the git link: https://github.com/mosip/mosip-functional-tests
On your local system, open Git Bash at any location.
Run the following command: git clone https://github.com/mosip/mosip-functional-tests
Build Test Automation Code
Navigate to the
apitest-commons
directory:
Build the project:
Ensure all prerequisites are met before running the updated tests. Refer to the updated README file for detailed setup and execution instructions.
For any issues or further assistance, please open an issue on GitHub.
Last updated
Was this helpful?