Skip to content

Latest commit

Β 

History

37 Commits

Folders and files

Repository files navigation

πŸš€ REST API Automation Framework | Java | REST Assured | TestNG | Maven | Extent Reports | Log4j2

Java REST API TestNG Maven Extent Reports Log4j2 GitHub Java


πŸ“Œ Project Overview

Modern software applications rely heavily on REST APIs for communication between services. Ensuring these APIs are reliable, secure, and performant is a critical responsibility for QA Automation Engineers and SDETs.

This repository demonstrates a production-ready REST API Automation Framework built using Java, REST Assured, TestNG, Maven, Log4j2, and Extent Reports. The framework follows modular design principles to support scalable, maintainable, and reusable automated API testing.

It is designed to reflect the architecture and coding practices commonly used in enterprise software projects.


🎯 Project Objectives

The primary goals of this framework are to:

  • Automate REST API testing efficiently
  • Improve test maintainability through modular architecture
  • Enable reusable request payloads and endpoint management
  • Support data-driven testing
  • Generate detailed execution reports
  • Capture centralized logs for easier debugging
  • Provide a CI/CD-ready framework for enterprise environments

πŸš€ Framework Highlights

βœ” REST Assured based API automation

βœ” Modular project architecture

βœ” Page Object–like Endpoint Layer

βœ” POJO-based Request Payload Models

βœ” TestNG Test Execution

βœ” Data-Driven Testing

βœ” Excel & JSON Test Data

βœ” Extent HTML Reports

βœ” Log4j2 Logging

βœ” Maven Build Management

βœ” Parallel Test Execution

βœ” CI/CD Ready (Jenkins / GitHub Actions)

βœ” Easily Extendable for Large Projects


πŸ— Framework Architecture

The framework follows a layered architecture to improve scalability and code maintainability.

                Test Classes
                      β”‚
                      β–Ό
               Endpoint Layer
                      β”‚
                      β–Ό
              Request Payloads
                      β”‚
                      β–Ό
               REST Assured APIs
                      β”‚
                      β–Ό
              Response Validation
                      β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                            β–Ό
   Extent Reports               Log4j2 Logs

πŸ“Έ Framework Structure

Enterprise-style REST Assured Automation Framework

(Insert your framework architecture image here)


πŸ“‚ Project Structure

REST-API-Automation-Framework
β”‚
β”œβ”€β”€ Reports
β”‚     └── Extent HTML Reports
β”‚
β”œβ”€β”€ TestData
β”‚     β”œβ”€β”€ JSON Files
β”‚     β”œβ”€β”€ Excel Files
β”‚
β”œβ”€β”€ logs
β”‚     └── Log4j2 Execution Logs
β”‚
β”œβ”€β”€ src
β”‚
β”‚   └── test
β”‚
β”‚       β”œβ”€β”€ java
β”‚       β”‚
β”‚       β”œβ”€β”€ API
β”‚       β”‚
β”‚       β”‚     β”œβ”€β”€ Endpoints
β”‚       β”‚     β”œβ”€β”€ Payloads
β”‚       β”‚     β”œβ”€β”€ Test
β”‚       β”‚     └── Utilities
β”‚       β”‚
β”‚       └── resources
β”‚
β”‚             └── log4j2.xml
β”‚
β”œβ”€β”€ test-output
β”‚
β”œβ”€β”€ pom.xml
β”œβ”€β”€ testng.xml
└── README.md

βš™ Technology Stack

Category Technology
Language Java
API Automation REST Assured
Test Framework TestNG
Build Tool Maven
Reporting Extent Reports
Logging Log4j2
Version Control Git
Repository GitHub
CI/CD Jenkins / GitHub Actions

✨ Framework Components

πŸ”Ή Endpoint Layer

Contains all REST API endpoint definitions.

Benefits:

  • Centralized API management
  • Easy maintenance
  • Better readability

πŸ”Ή Payload Layer

POJO classes representing request payloads.

Benefits:

  • Cleaner code
  • Reusable request models
  • Easier serialization

πŸ”Ή Test Layer

Contains TestNG test cases responsible for:

  • Sending requests
  • Validating responses
  • Assertions
  • Business validations

πŸ”Ή Utilities Layer

Reusable helper classes including:

  • Excel Reader
  • JSON Utilities
  • Data Providers
  • Report Generation
  • Common Methods

πŸ”Ή Reporting

Extent Reports provide:

  • Execution Summary
  • Passed Tests
  • Failed Tests
  • Screenshots (if integrated)
  • Execution Time
  • Environment Details

πŸ”Ή Logging

Log4j2 enables:

  • Detailed execution logs
  • Exception tracking
  • Debug information
  • API request/response logging

πŸ“Š Skills Demonstrated

This project showcases practical experience with:

  • REST API Testing
  • REST Assured
  • API Request Validation
  • API Response Validation
  • JSON Parsing
  • POJO Serialization
  • TestNG
  • Maven
  • Extent Reports
  • Log4j2
  • Data-Driven Testing
  • Framework Design
  • Java Programming
  • Enterprise Automation Frameworks

πŸ§ͺ API Testing Capabilities

The framework supports validation of:

  • HTTP Status Codes

  • Response Body

  • Response Headers

  • JSON Path Assertions

  • Authentication

  • CRUD Operations

  • Request Payload Validation

  • Query Parameters

  • Path Parameters

  • Data-Driven API Testing

  • API Regression Testing


πŸš€ How to Execute

Clone Repository

git clone https://github.com/ArpitChoubey/REST-API-Automation-Framework-JAVA-Rest-Assured.git

Install Dependencies

mvn clean install

Execute Tests

Using Maven

mvn clean test

Or execute using

testng.xml

πŸ“ˆ Reports Generated

After execution:

Reports/

Contains

  • Extent HTML Report

Execution Logs

logs/

Contains

  • Log4j2 Logs

🌍 Enterprise Applications

This framework can be extended to automate APIs for:

  • Banking Applications

  • Healthcare Platforms

  • Insurance Systems

  • Retail & E-Commerce

  • Telecom Applications

  • CRM Platforms

  • ERP Systems

  • Microservices Architecture

  • Cloud-native Applications


🎯 Ideal For

This project is valuable for:

  • QA Engineers

  • API Automation Engineers

  • Software Development Engineers in Test (SDETs)

  • Automation Test Engineers

  • Java Developers

  • Manual Testers transitioning to Automation

  • Students preparing for Automation Interviews


πŸ’Ό Why Recruiters & Hiring Managers Should Review This Repository

This project demonstrates:

βœ… Strong Java Programming

βœ… REST API Automation

βœ… Enterprise Framework Design

βœ… Scalable Architecture

βœ… Clean Code Principles

βœ… Reporting & Logging

βœ… Data-Driven Testing

βœ… CI/CD Readiness

βœ… Industry Best Practices

These are essential capabilities expected from experienced QA Automation Engineers and SDETs working on enterprise-grade software products.


πŸš€ Future Enhancements

Planned improvements include:

  • OAuth 2.0 Authentication

  • JWT Token Handling

  • API Schema Validation

  • Docker Integration

  • GitHub Actions Pipeline

  • Jenkins Pipeline

  • Allure Reporting

  • Parallel API Execution

  • Environment Configuration

  • API Mocking

  • Contract Testing

  • Performance Testing Integration


πŸ‘¨β€πŸ’» About the Author

Arpit Choubey

SDET | QA Automation Engineer | Java | REST Assured | Selenium | Playwright | Appium | TestNG | Maven | SQL | Jenkins | Docker

Passionate about designing scalable automation frameworks, improving software quality, and sharing practical learning resources with the automation testing community.


🌐 Connect With Me

GitHub

https://github.com/ArpitChoubey

LinkedIn

https://www.linkedin.com/in/arpitchoubey/

Medium

https://medium.com/@ArpitChoubey9


⭐ Support

If you found this repository useful, please consider giving it a Star ⭐.

Your support motivates me to continue building enterprise-grade automation frameworks and open-source learning resources for the QA community.


πŸ’‘ "Quality APIs power modern software. Great automation frameworks ensure they remain reliable, scalable, and production-ready."

Releases

Packages

Contributors

Languages