How heyrmi/api-testing-framework works
Project type and purpose
• This is a full-stack automated API-testing framework written in Java.
• Core functions:
– Functional API tests using Rest-Assured & TestNG
– Load tests using Gatling
– Report generation via ExtentReports
– CI/CD integration (GitHub Actions, Docker)
– Slack notifications, GitHub Pages hosting of reports
File structure
• Top-level artifacts:
– Dockerfile, pom.xml, testng.xml, .github/workflows, Reports directory
• src/main/java/com/apitesting:
– annotation, constants, enums, listeners, pojo, reports, requestbuilder, utils
• src/test/java/com/apitesting/tests & com.gatling/tests:
– TestNG functional tests (GetTests, PostTests)
– Gatling load-test simulations (GoogleTest, VideoGameDBTest)
• src/test/resources:
– JSON payload templates, config.properties, gatling.conf
Extract architecture clues from README
• Tech stack: Rest-Assured, Gatling, Postman, TestNG, ExtentReports, Java Faker
• CI/CD: GitHub Actions workflows for tests, alerts, Docker image build & push
• Reporting: Slack integration and hosting HTML report via GitHub Pages
Main components
a. Test Runner Layer
– TestNG engine invoking functional tests
– Gatling engine invoking load tests
b. Test Code & Libraries
– RequestBuilder & APIUtils (Rest-Assured)
– Data models (pojo/User) & JSON templates
– Utility classes (PropertyUtils, JiraUtils, RandomUtils)
– FrameworkAnnotation & TestListener (hooks, retry logic, reporting events)
c. Reporting & Notification
– ExtentManager, ExtentLogger, ExtentReport producing HTML reports
– Slack (external service) receiving alerts via JiraUtils or webhook
– GitHub Pages hosting latest report
d. CI/CD & Deployment
– GitHub Actions workflows (tests.yml, builddockerimage.yml, alerts.yml)
– Dockerfile packaging framework into container
– DockerHub for publishing image
e. External Systems
– Target APIs under test (e.g., VideoGameDB, Google)
– Slack webhook endpoint
Relationships & data flow
• TestNG/Gatling runner → requestbuilder builds HTTP requests → APIUtils executes calls via Rest-Assured or Gatling client → responses parsed into POJOs
• TestListener captures pass/fail events → ExtentLogger logs steps → ExtentReport writes HTML → Reports folder
• At end of run → SlackUtils sends summary message
• GitHub Actions triggers on push/PR → runs tests and build workflows → pushes Docker image → publishes reports to GitHub Pages
Architectural patterns & principles
• Modular design: separation of concerns (builders, utils, models, listeners)
• Singleton pattern for ExtentManager and configuration reads
• Annotation-driven test metadata (FrameworkAnnotation)
• CI pipeline as code (GitHub Actions YAML)
• Containerization for environment consistency