Loading repository dataβ¦
Loading repository dataβ¦
AtaFarivar / repository
π Enterprise-grade API Automation Framework for Online Bookstore. Features Java 21, Rest-Assured, and TestNG. Fully Dockerized with CI/CD pipeline and Live Allure Reporting via GitHub Actions.
This repository contains a professional-grade API automation framework designed for the Online Bookstore system.
Developed by Ata Pourfarivarnezhad, a Software Developer & SDET, this project demonstrates advanced API test automation practices using Java 21, Rest-Assured, and TestNG.
The framework is built with scalability, maintainability, and real-world project standards in mind.
This project is fully integrated with GitHub Actions and GitHub Pages for seamless delivery and monitoring.
You can access the real-time execution dashboard without running any code locally.
The report includes:
π View Live Allure Report https://atafarivar.github.io/api-automation-assessment/
You can trigger a fresh test run directly from the GitHub interface:
The pipeline will:
[!NOTE] Deployment Time: While the tests execute in seconds, GitHub Pages may take 8-10 minutes to process the new Allure data and update the live link. Please monitor the
pages-build-deploymentjob in the Actions tab to confirm when the latest report is live.
The framework follows a decoupled, modular architecture to ensure long-term maintainability.
clients
Abstraction layer for API endpoints (BookClient, AuthorClient)
@Step annotations for readable execution logsmodels
POJOs for Book and Author entities
specs
Centralized SpecFactory
tests
Organized test suites covering:
To meet enterprise-grade expectations, the following strategic decisions were implemented:
Environment Resilience (Constructor vs Builder)
Although Lombok is used in the project, test data creation intentionally relies on Constructor / Setter patterns.
This avoids IDE-dependent annotation processing issues and guarantees 100% stability in CI and Docker environments.
Contract Validation
Every Happy Path test validates the Content-Type header to ensure strict adherence to the JSON response contract.
Fail-Fast Debugging
Client requests include .log().ifValidationFails() to keep console output clean while still providing actionable logs on failure.
Performance SLA Tracking
Hamcrest matchers assert that API response times remain within business SLA limits (< 2 seconds).
The framework contains 20 high-impact automated test cases with a 100% pass rate.
Happy Path
Performance
Negative & Edge Scenarios
DELETE on base URL forbidden)0 β 404 Not FoundBusiness Logic
Performance
Edge Cases
404 Validation)The framework is fully containerized to guarantee consistent execution across environments.
docker build -t bookstore-automation-ata .
sudo rm -rf allure-results && docker run --rm -v "$(pwd)/allure-results:/app/target/allure-results" bookstore-automation-ata
rd /s /q allure-results & docker run --rm -v "%cd%/allure-results:/app/target/allure-results" bookstore-automation-ata
View the report locally using Allure:
allure serve allure-results
This project is intentionally designed to reflect how API automation is built and maintained in real production teams,
not simplified demo examples.