Enterprise-grade REST API test automation framework built with Java, RestAssured, and TestNG. Demonstrates production-level patterns used in fintech/payments testing environments.
src/test/
├── java/com/rajTestAutomation/
│ ├── base/ # BaseTest - RequestSpec setup, auth, logging
│ ├── models/ # POJO models (PaymentRequest, PaymentResponse)
│ ├── tests/ # Test classes (PaymentAPITests, AuthAPITests)
│ └── utils/ # ApiUtils - reusable GET/POST/PUT/DELETE helpers
├── resources/
│ ├── config.properties # Environment configs (base URL, credentials)
│ └── schemas/ # JSON schemas for contract validation
├── pom.xml
└── testng.xml
- Page Object Model equivalent for APIs — BaseTest + RequestSpecBuilder
- JSON Schema Validation — contract testing for every response
- Allure Reports — visual test reports with request/response details
- Parameterized Tests — data-driven via TestNG DataProvider
- Negative Testing — 400/401/404/422 response validation
- Idempotency Testing — duplicate payment detection (critical for fintech)
- CI/CD — GitHub Actions runs on every push/PR
| Tool | Version | Purpose |
|---|---|---|
| Java | 17 | Language |
| RestAssured | 5.3.x | HTTP client for API testing |
| TestNG | 7.8.x | Test runner |
| Allure | 2.x | Test reporting |
| Maven | 3.x | Build tool |
| GitHub Actions | - | CI/CD |
- Payment initiation (POST /payments)
- Payment status retrieval (GET /payments/{id})
- Authentication flows (OAuth2 token validation)
- ISO 20022 / PSD2 compliance field validation
- Contract testing via JSON schema
- Negative: invalid IBAN, missing fields, duplicate transactions
# Run all tests
mvn clean test
# Run with specific suite
mvn clean test -Dsurefire.suiteXmlFiles=testng.xml
# Generate Allure report
mvn allure:serveBuilt this framework pattern at Rabobank for validating iDEAL-to-Wero payment migration APIs handling 500K+ daily transactions. Key design decisions: RequestSpecBuilder centralises auth so tests stay clean; JSON schema validation catches contract breaks before they reach production; idempotency tests specifically prevent double-charge scenarios.
By Rajasekhar Narisetti — Senior Test Automation Engineer | Utrecht, NL