This is a REST API automation framework built using Java, TestNG, RestAssured, and Allure.
This framework is designed to automate REST API testing using Java-based tools and libraries. It provides a structured approach to writing and executing API tests, generating comprehensive test reports, and maintaining test data and configurations.
- Modular Structure: Organized into separate packages for API clients, configuration, enums, helpers, and test cases, providing a clear separation of concerns and easy navigation.
- TestNG Integration: Utilizes TestNG for test case management, allowing the execution of tests, grouping, parallel execution, and test configuration through annotations.
- RestAssured Integration: Uses RestAssured for making HTTP requests, validating responses, and extracting data from JSON/XML responses.
- Allure Reporting: Integrates Allure for generating interactive and comprehensive test reports with detailed information about test execution, including step-by-step descriptions, attachments, and historical trends.
- Configuration Management: Supports configuration management through properties files, allowing flexible configuration of test environments, endpoints, and other settings.
- Prerequisites: Ensure you have Java JDK, Maven, Allure and TestNG installed on your system.
- Clone the Repository: Clone this repository to your local machine using
git clone. - Import Project: Import the project into your preferred IDE (Eclipse, IntelliJ, etc.).
- Configure Dependencies: Ensure all necessary dependencies are configured in the
pom.xmlfile. - Run Tests: Execute test cases using TestNG, or your IDE's test runner.
- View Reports: After test execution, view Allure reports in the make sure you have allure in your machine and uses command
allure serve allure-results.
- Writing Tests: Create new test cases in the
testspackage using TestNG annotations and RestAssured API. - Executing Tests: Run tests using TestNG, or your IDE's test runner.
- Analyzing Reports: View detailed test reports generated by Allure in the
allure serve allure-resultsdirectory.