Skip to content

About

A scalable API test automation framework using Java, JUnit and RestAssured.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java API Test Automation

Build Status

Project Description

Java API Test Automation is an automated API testing project built with Java. It uses JUnit Jupiter for test execution and RestAssured for HTTP requests and response validation.

The project demonstrates a structured approach to API test automation, with reusable components for request configuration, response handling, assertions, logging, and test support.

The tests are implemented against the ServeRest API, providing a practical example of API test automation using a real REST API.


Prerequisites

Before running the project, make sure you have installed:

Installation

  1. Clone the repository:
git clone https://github.com/felseje/java-api-test-automation.git
cd java-api-test-automation
  1. Install the Maven dependencies:
mvn clean install

Running Tests

The API tests are implemented as integration tests and follow the *IT naming convention. They are executed by the Maven Failsafe Plugin.

To run the tests:

mvn verify

Failsafe test reports are generated in:

target/failsafe-reports

Project Structure

src/
├── main/
│   ├── java/
│   │   └── io/github/felseje/apitestautomation/
│   │       ├── client/          # API clients and DTOs
│   │       ├── config/          # Application and test configuration
│   │       ├── core/            # Core HTTP and test support components
│   │       ├── exception/       # Custom exceptions
│   │       ├── factory/         # Request and response specification factories
│   │       ├── service/         # Service-level operations
│   │       └── util/            # Shared utility classes
│   └── resources/
│       └── config/
└── test/
    ├── java/
    │   └── io/github/felseje/apitestautomation/
    │       ├── suite/            # Test suites
    │       ├── test/             # API integration tests (*IT)
    │       └── testdata/         # Test data
    └── resources/
        └── schemas/              # JSON schemas for response validation
            ├── login/
            └── user/

Example Tests

The project contains automated integration tests against the ServeRest API, covering different API behaviors and demonstrating how the test automation components can be used in practice.

Technologies Used

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A scalable API test automation framework using Java, JUnit and RestAssured.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages