GitHunt
TE

testsmith-io/api-test-automation-java-testng-restassured

API Test Automation Examples using Java, TestNG, and RestAssured for practicesoftwaretesting.com

API Test Automation with Java, TestNG and Rest Assured

API Test Automation with Java, TestNG and Rest Assured

This repository contains example scripts for API test automation using:

  • Java
  • Rest Assured for API interaction
  • TestNG for test execution

Features

  • Examples of GET, POST, and Protected API requests.
  • Clear demonstration of test automation practices with assertions and chaining requests.
  • Fully automated CI pipeline using GitHub Actions.

Test API

All examples in this repository are designed to work with the Practice Software Testing API, a publicly available API for learning and practicing software testing. You can explore the API documentation and endpoints here:
๐Ÿ‘‰ Practice Software Testing API ๐Ÿ‘ˆ

Examples Included

  1. GET Request: Fetch a list of brands with GET /brands.
  2. Login API: Authenticate using POST /login with an email/password payload.
  3. Protected API Request: Authenticate, then use a token to fetch data with GET /invoices.

Prerequisites

  • Java 16+
  • Maven
  • An IDE like IntelliJ IDEA Community Edition

Setup and Run

  1. Clone this repository:
    git clone https://github.com/testsmith-io/api-test-automation-java-testng-restassured.git
  2. Navigate to the project directory:
    cd api-test-automation-java-testng-restassured
  3. Run the tests:
    mvn test

Automated Workflow

The repository includes a GitHub Actions workflow to automatically build and test the project.

Languages

Java100.0%

Contributors

Created December 18, 2024
Updated March 13, 2026
testsmith-io/api-test-automation-java-testng-restassured | GitHunt