Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java RestAssured API Testing Framework

Java RestAssured TestNG CI

Enterprise-grade REST API test automation framework built with Java, RestAssured, and TestNG. Demonstrates production-level patterns used in fintech/payments testing environments.

Framework Architecture

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

Key Features

  • 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

Tech Stack

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

Test Coverage

  • 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

Running Tests

# Run all tests
mvn clean test

# Run with specific suite
mvn clean test -Dsurefire.suiteXmlFiles=testng.xml

# Generate Allure report
mvn allure:serve

Interview Talking Points

Built 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages