assert_
glossary ↓ downloads
track: java · selenium
suite 06 · suite test

Suite test: API automation

6 questionsevery test must pass to merge

This is the suite's regression gate. Answer every question, then run the suite. Wrong answers show an explanation — read it, then re-run. In this course, like on a real team, you don't merge on a red build.

01.A successful POST that created a resource typically returns…
201 Created. Plain 200 is generic success; 204 is success-with-no-body (common on DELETE).
02.Status 4xx vs 5xx — the rule of thumb:
400/401/404 say “your request was wrong”; 500s say “the server fell over.” It's your first triage signal.
03.REST Assured's given() / when() / then() maps onto…
Your manual test case template became a syntax. given = setup, when = the call, then = assertions.
04.For { "address": { "city": "Gwenborough" } }, the JSON path to the city is…
Dot notation walks nested objects — the same path you'd write in body("address.city", equalTo(…)).
05..extract().path("id") exists so you can…
POST → extract the new id → GET /things/{id} to verify. That variable-passing is 90% of “advanced” API automation.
06.Why must rest-assured be declared before junit-jupiter in pom.xml?
An official REST Assured quirk: declaration order decides which transitive Hamcrest you get. Wrong order = confusing matcher errors.
passing marks this suite test complete on the roadmap · revision aid: the suite cheatsheet
← Chaining requests — real API flows Real-world engineering →