Learning lab | Web & API, Learning Labs
REST API Automation
A layered REST Assured framework (one manager per API resource) with one end-to-end scenario and a custom HTML report.
One end-to-end scenario traverses the user, posts and comments APIs; the repository is a learning example, not broad API coverage.
Evidence checked 10 Oct 2026 | Latest CI workflow
On this page
Problem and 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.
Architecture
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 APITechnology and tools
| 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) |
Engineering decisions and approach
- 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
Test scope and execution approach
Project-specific checks and execution details documented in the repository:
- 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
Results with dated evidence
Historical repository or workflow evidence · older evidence; recheck the linked source
Latest CI workflow
One end-to-end scenario traverses the user, posts and comments APIs; the repository is a learning example, not broad API coverage.
Evidence checked: | Open dated evidence
Evidence explorer
Static screenshots are labelled as images; dated workflow links identify the execution evidence and its check date.
Static material from the public repository. The linked verification record was checked 2026-10-10; that date is not a screenshot capture date.
Dated workflow record
Evidence checked 2026-10-10. Open Latest CI workflow
Local 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).
Workflow and reports
Known 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)
- The evidence is limited to the public repository and linked run; it does not establish customer production impact.