Skip to content

Module 17 · API & Web-Service Testing

Beyond the 1Z0-830 exam

The exam doesn't cover HTTP or web services, but exercising REST APIs is daily work for a Java developer and a core SDET skill. This module covers the JDK's HttpClient, JSON binding, and the two libraries that dominate API test automation — RestAssured and WireMock.

Exercising and verifying HTTP/REST services: making requests with java.net.http, binding JSON to objects, writing fluent REST assertions with RestAssured, and stubbing dependencies with WireMock.

Lab policy

This module's lab is green by default: it drives the JDK's HttpClient against an in-JVM HttpServer (both JDK built-ins) and binds JSON with Jackson — no Docker, no real network. The RestAssured and WireMock snippets (L03–L04) are illustrative; in a real project they're additional test dependencies.

Lessons

#LessonWhat it covers
01HTTP with java.net.httpHttpClient/HttpRequest/HttpResponse, sync & async.
02JSON BindingJackson/Gson serialize & deserialize, trees, pitfalls.
03REST Testing with RestAssuredgiven/when/then, status/body/header assertions, JSON-path.
04Mocking Services with WireMockStubbing, request matching, contract/schema checks.

Module Mini-Exam

A mixed quiz over this module. Since this is beyond-exam material, treat it as a self-check rather than exam simulation.

Mini-Exam

  • 8 questions
  • 12 minutes
  • 8 total points
  • Pass: 6 pts (68%)