Skip to content

Enterprise-grade API Automation Framework for AHB-ETP: supports scalable test design, environment-driven execution, reusable request utilities, data-driven validations, and CI/CD integration

Notifications You must be signed in to change notification settings

Premsenareddy/ahb-etp-test-framework

Repository files navigation

AHB ETP Test Automation Framework

Java Micronaut Gradle Docker Gatling GitHub Actions

A modular, enterprise-grade API Test Automation Framework for a digital banking platform, built using:

  • Java 11
  • Micronaut
  • Gradle
  • Gatling for performance tests
  • MockServer for service virtualization
  • Kubernetes + port-forward helpers

This repository showcases:

  • Cleanly layered test architecture
  • Environment-aware configuration
  • BDD / scenario-based test modelling
  • Reusable test utilities & data builders
  • CI/CD-friendly structure

📁 Project Structure

ahb-etp-test-framework
│
├── src
│   ├── main
│   │   ├── java              # Test support code, configs, adapters
│   │   └── resources         # Micronaut app configs (sanitised)
│   └── test
│       └── java              # API tests, journeys, scenarios
│
├── mockserver                # MockServer config & Dockerfile
├── kube                      # Kubernetes manifests & service descriptors
├── setup
│   ├── k8-setup              # K8s/Vault setup scripts (sanitised)
│   └── port-forward          # Local port-forward helper scripts
├── scripts                   # Test runners, RBAC helpers, utilities
├── secret/                   # (Removed in public repo – certificates/keys)
│
├── Dockerfile                # Containerized test runner
├── build.gradle              # Gradle build config
├── gradle.properties
├── skaffold.yaml             # Example deployment / pipeline integration
└── README.md


🏗 High-Level Architecture

                +-----------------------------+
                |        Test Runner          |
                |      (Gradle / JUnit5)      |
                +--------------+--------------+
                               |
                +--------------+--------------+
                |   Test Layers & Journeys    |
                | (APIs, flows, BDD-style)    |
                +--------------+--------------+
                               |
                +--------------+--------------+
                |   API Interaction Layer     |
                | (Micronaut HTTP Clients)    |
                +--------------+--------------+
                               |
         +---------------------+----------------------+
         |     Core Banking & Integration Services    |
         +---------------------+----------------------+
                               |
         +-------------------------------------------+
         | MockServer / K8s Port Forward / Proxies  |
         |  (Service Virtualisation & Connectivity) |
         +-------------------------------------------+


1. Start Port Forwarding (Kubernetes)

If you are running against a remote K8s environment, use the provided helper:
./startPortForward.sh dev
# or
./startPortForward.sh cit
This exposes the backing services locally so the tests can access them via configured hostnames/ports.

2. Run API Test Suites

Run all tests for a given Micronaut environment:
MICRONAUT_ENVIRONMENTS=dev ./gradlew clean test

Or target a specific suite / scenario (example):
MICRONAUT_ENVIRONMENTS=dev ./gradlew clean test \
  --tests "uk.co.company.journey.scenarios.adult.*"


🧪 BDD / Gherkin Style

Scenarios are structured in a BDD-friendly format to align with business acceptance criteria:
TEST   – Ticket number / scenario summary
GIVEN  – Preconditions (customer state, accounts, mocks)
WHEN   – Action under test (API call / journey step)
THEN   – Expected outcome (status codes, business rules)
DONE   – Scenario end


🧿 Mock Server (Service Virtualisation)

The mockserver/ module is used to decouple tests from downstream dependencies.

Typical workflow:
cd mockserver
# Example: build and run MockServer for local dev
./build-deploy-k8.sh

Use this when you need to:

Simulate third-party responses

Isolate external failures or edge cases

Test flows before downstream systems are ready


📈 Performance Testing (Gatling)

Performance / load tests are implemented using Gatling under src/gatling/.

Example workflow:

Make sure base e2e tests pass:

MICRONAUT_ENVIRONMENTS=dev ./gradlew clean test \
  --tests "uk.co.company.journey.scenarios.*"

Run a specific Gatling simulation:
./gradlew clean gatlingRun-perf.simulation.PaymentLoadTest

This generates HTML reports with metrics like:

Response time distribution

Percentiles

Requests per second

Error rates


✅ Test Strategy (High-Level)

API Testing

Request/response validation

HTTP status and error handling

Business rule enforcement

Negative & boundary cases

Integration Testing

End-to-end customer journeys (onboarding, payments, cards, etc.)

K8s service-to-service flows

MockServer for unstable dependencies

Performance Testing

Load tests against critical journeys

Baseline & regression performance

Throughput and latency KPIs

Security & Resilience (Conceptual)

Token/JWT handling (where relevant)

Input validation scenarios

Fault and error-path validation

🛠 Tech Stack Summary
Category	Tools / Frameworks
Language	Java 11
Framework	Micronaut
Build	Gradle
Testing	JUnit 5, scenario-based tests
Performance	Gatling
Virtualisation	MockServer
CI/CD	GitHub Actions (ready to plug in)
Infra	Docker, Kubernetes, Skaffold
🤝 Usage

This repository is intended as a portfolio-friendly version of a real-world banking test framework:

Clean architecture & structure

Sanitised configuration (no real secrets)

Ready for interview walk-throughs

Good example of API + journey + performance testing

You are welcome to clone/fork for learning, demos, or discussions.

📬 Contact

Premsena Reddy Anumandla
Senior QA Automation Engineer

GitHub: @Premsenareddy

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


About

Enterprise-grade API Automation Framework for AHB-ETP: supports scalable test design, environment-driven execution, reusable request utilities, data-driven validations, and CI/CD integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages