More projects · Java · API
REST API Automation Framework
A layered REST API test framework with Java 17, REST Assured and TestNG against the public JSONPlaceholder API, with a custom self-contained HTML report.
Purpose
Shows how an API framework separates the test scenario from HTTP details: tests speak in business terms, one manager per API resource handles requests, and builders do the low-level work.
Technology stack
| Area | Tools |
|---|---|
| Language / build | Java 17, Maven |
| HTTP | REST Assured |
| Test runner | TestNG (soft assertions) |
| JSON mapping | Jackson |
| Logging | Log4j2 |
| CI | GitHub Actions (CircleCI configuration also included) |
Architecture overview
tests (CommentTest) scenario in business terms, no HTTP code
│
manager (UserManager, PostManager, CommentManager)
│ base Manager: send request, log + assert status, map JSON
builder (RequestBuilder, ResponseBuilder)
│
REST Assured + Jackson ──▶ JSONPlaceholder APIKey engineering decisions
- One manager per API resource and no global state
- Responses mapped to POJOs instead of JSON paths in tests
- Soft assertions so one run reports every bad value, not just the first
- Test data in a properties file, overridable with -D
Implemented features
- End-to-end scenario: find a user by username, fetch all their posts, fetch all comments on those posts, validate every comment's e-mail format
- Custom self-contained HTML report written by a TestNG listener
Setup and execution
mvn clean test
mvn clean test -Dusername=Bret # other test dataRequirements: JDK 17+, Maven 3.6+, internet access (the tests call the live API).
Sample test results

CI workflow
GitHub Actions runs mvn clean test on every push. A CircleCI configuration is included but not connected.
Known limitations and future improvements
Limitations
- One test scenario: the project shows the framework structure rather than broad API coverage
- Depends on a public API that returns fixed demo data (writes are not persisted)
Next steps
- Negative tests (404, invalid payloads) and JSON schema validation
- Data-driven tests across several users
- See the Enterprise framework for broad API coverage (57 API tests with schema validation)
