A modern API test automation framework built with Java and REST Assured.
It provides reusable request/response specifications, structured endpoint classes, and rich reporting with Extent Reports.
This framework is designed for automated testing of RESTful APIs in a structured, maintainable, and reusable way.
code-driven tests for flexible test automation.
- Java JDK 11 or higher
- Maven 3.x
- IDE (IntelliJ IDEA, Eclipse, etc.)
- Optional: Cucumber or TestNG plugins for IDE
- Clone the repository:
git clone https://github.com/spy235/RestAssured-Framework.git
cd RestAssured-Framework- Install dependencies and run tests using Maven:
mvn clean testsrc/main/java/ - Core framework classes (request/response specs, utils)
src/test/java/ - Test classes, service classes, and base classes
src/test/resources/ - Cucumber feature files, test data
reports/ - Generated test reports (Extent/Allure)
pom.xml - Maven dependencies and build configuration
testng.xml - TestNG configuration (optional)
- Run all tests:
mvn clean test- Run specific TestNG groups:
mvn test -Dgroups="login"- Run Cucumber tests with tags:
mvn test -Dcucumber.options="--tags @smoke"- Extent Reports: HTML report generated in
reports/extent/after test execution. - Allure Reports: Generate by:
allure serve target/allure-results- Base URI, credentials, and environment variables are configured in the
ConfigReaderclass orapplication.properties. - Modify
requestSpecorresponseSpecinSpecBuildersfor global API request/response settings.
- Fork the repository
- Create a new branch
- Make changes or add new tests
- Submit a pull request
- Default request and response specifications are global and can be used across all tests with
RestAssured.given(). - Ensure POJOs (request/response models) match API payloads exactly for deserialization.