Skip to content

Enterprise-grade API Test Automation Framework built for scalable, cloud-ready, CI/CD-driven API validation using Java, RestAssured, TestNG, Docker & Kubernetes.

Notifications You must be signed in to change notification settings

Premsenareddy/ahb-dtp-test-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AHB DTP Test Automation Framework

Java Micronaut Gradle Docker Performance GitHub Actions

A modular, scalable API Test Automation Framework built using Java 17, Micronaut, Gradle, and integrated tooling such as MockServer, Kubernetes Port Forwarding, and Gatling for performance testing.

This framework demonstrates enterprise-grade QA automation practices:

  • Clean layered architecture
  • Environment-based execution
  • BDD/Gherkin-style modelling
  • API journey validations
  • CI-ready project structure
  • Reusable utilities & data builders
  • K8s port-forward workflow for backend services

📁 Project Structure

ahb-dtp-test-framework │ ├── src/ # Test code (APIs, journeys, validations) ├── assets/ # Images, test screenshots (optional) ├── mockserver/ # Service virtualization configs ├── kube/ # Kubernetes manifests & port-forward setup ├── scripts/ # Execution helpers ├── setup/ # Dev/QE environment setup ├── secret/ # Placeholder (contains no secrets) │ ├── Dockerfile # Containerized runtime ├── build.gradle # Gradle build config ├── gradle.properties ├── skaffold.yaml # CI/CD orchestration └── README.md

yaml Copy code


🏗 High-Level Architecture

+---------------------------+ | Test Runner | | (Gradle / JUnit5) | +-------------+-------------+ | +-------------+-------------+ | Test Layers & Helpers | | (BDD, Steps, Validators) | +-------------+-------------+ | +-------------+-------------+ | API Interaction Layer | | (Micronaut HTTP Clients) | +-------------+-------------+ | +---------------------------+ | External Services / APIs | +---------------------------+ | +---------------------------+ | MockServer / K8s Port FW | | (Service Virtualization) | +---------------------------+

yaml Copy code


▶️ Running Tests

1️⃣ Setup Port Forwarding

Expose backend services locally:

./startPortForward.sh obp-dev
# or
./startPortForward.sh obp-cit
2️⃣ Run API Test Suites
Dev environment:

bash
Copy code
MICRONAUT_ENVIRONMENTS=dev ./gradlew clean test
CIT environment:

bash
Copy code
MICRONAUT_ENVIRONMENTS=cit ./gradlew clean test
🧪 BDD / Gherkin Test Modelling
Scenarios follow a BDD-friendly format:

pgsql
Copy code
TEST   – Scenario summary
GIVEN  – Preconditions
WHEN   – Action executed
THEN   – Assertions
DONE   – End of test
🧿 Mock Server
For downstream API simulation:

bash
Copy code
cd mockserver
./runMockServer.sh
Used for:

Unstable dependencies

Negative testing

Edge cases

Integration isolation

📈 Performance Testing (Gatling)
Ensure E2E tests pass first:

bash
Copy code
MICRONAUT_ENVIRONMENTS=dev ./gradlew clean test --tests "uk.co.company.journey.*"
Then run Gatling:

bash
Copy code
./gradlew clean gatlingRun-perf.simulation.PaymentLoadTest
Produces detailed HTML performance reports.

🧪 Test Strategy Overview
✔ API Testing
Status codes

JSON body validation

Business rules

Negative cases

Journey validations

✔ Integration Testing
K8s service-to-service flows

MockServer for dependencies

Environment toggles

✔ Performance Testing
Load & stress tests

Latency & throughput

Regression performance

✔ Security / Contract Testing (Optional)
JWT token handling

Contract mocks

Response schema validation

🛠 Tech Stack Summary
Category	Tools
Language	Java 17
Framework	Micronaut
Build	Gradle
CI/CD	GitHub Actions, Skaffold
Containers	Docker
Virtualization	MockServer
Performance	Gatling
Orchestration	Kubernetes

🤝 Contributions & Usage
This framework highlights:

Enterprise-class QA engineering

Real-world API automation structure

Performance engineering techniques

Clean architecture principles

Feel free to use or adapt for learning, interviews, or portfolio enhancement.

📬 Contact
Premsena Reddy Anumandla
Senior QA Automation Engineer

GitHub: @Premsenareddy
LinkedIn: https://www.linkedin.com/in/premsena-anumandla-a802b4179/

About

Enterprise-grade API Test Automation Framework built for scalable, cloud-ready, CI/CD-driven API validation using Java, RestAssured, TestNG, Docker & Kubernetes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages