Skip to content

API test automation framework using Kotlin, RestAssured, and JUnit 5, focusing on Clean Architecture and Allure reporting.

Notifications You must be signed in to change notification settings

michaelbrendo/api-testing-kotlin

Repository files navigation

🧪 API Testing with Kotlin

Build Tests Allure Report License: MIT

Automated API testing project using Kotlin, Spring Boot, Rest-Assured, and JUnit.


🚀 How to Run Tests

./gradlew test

Or use the provided Makefile for automation:

# Run tests
make test
# Full setup: install Allure, run tests, generate report and serve
make setup

Requirements

  • Java 17 — OpenJDK distribution from Adoptium
  • Gradle — Build automation tool
  • WSL2 with Ubuntu — Windows Subsystem for Linux (for Windows users)

Setup VS Code / IntelliJ

To open the project in VS Code with WSL and ensure imports work:

  • Configure the Workspace JDK to JavaSE-17.
  • Install the following VS Code extensions (Remote WSL):
    • Extension Pack for Java (Microsoft)
    • Kotlin (the extension that works best for your setup)
  • Run Gradle: Refresh Gradle Project to load dependencies.

⚠️ Note: Navigation, refactoring, and full Kotlin support work better in IntelliJ IDEA.

APIs Used

This project interacts with public REST APIs for testing purposes:

  • JSONPlaceholder REST API — provides mock data like posts, comments, users, etc.
  • JSONPlaceholder.org — visual interface for testing endpoints (requires cookies enabled)

🛠 Makefile & Allure Report

  • The Makefile automates test execution and report generation.
  • Allure reports are generated in build/reports/allure-report.
  • Serve the report locally with make serve-allure.
  • Reports are automatically deployed to GitHub Pages via GitHub Actions.
# Install Allure CLI locally if not installed
make install-allure
# Generate Allure report only
make allure-report
# Serve Allure report locally
make allure-serve

Technologies & Dependencies

  • Kotlin 1.9.24
  • Spring Boot 3.3.0
  • JUnit 4 + JUnit Platform
  • Rest-Assured with Kotlin Extensions
  • Logback + SLF4J for logging
  • Tomcat (provided runtime)
  • Allure (test reporting)

License

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

About

API test automation framework using Kotlin, RestAssured, and JUnit 5, focusing on Clean Architecture and Allure reporting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published