Designing API tests
Good API tests come from thinking about what goes in and what must come out. A tester picks inputs on purpose, checks the whole reply and keeps the tests easy to repeat.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: testing a vending machine. You try the right coins, then the wrong coins, then no coins. You press a button for an empty row, and you press the button twice. Each try asks a different question about the machine.
Daily List is a to-do list app. Its has a call to create a task. Tom, the tester, treats that call like the machine. He tries a task with good data, a task with no title and a very long title. He also tries to add a task to a list that belongs to a stranger.
Each try is an : a test that sends a request and checks the response and any side effects. The data it sends is the . Afterwards Tom checks the reply has the right shape, which is a schema check: checking that a reply has the expected fields and types.
He writes down what he expects before he sends. A good task should get a created reply and appear in the list. A task with no title should be refused and saved nowhere. In this fixture the other test user's list is private and not shared, so the caller's create action must be refused.
The vending picture has a limit. A machine has a few buttons. An API call can take many fields in many combinations, so Tom has to choose the tries with care.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
A schema can also constrain allowed values, lengths and numeric ranges. It does not by itself prove ownership or the business result.
PLAIN WORDS · 3 in this section
- vending
- selling goods from a machine
- constrain
- limit or restrict what can happen
- numeric
- made only of numbers
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Choosing inputs on purpose, checking the whole reply and reading back what was saved.
- Good input
- Bad input
- No input or no sign-in
- Twice
- Read back
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Vending machine | The API call |
| Right coins and wrong coins | Good and bad request bodies |
| Checking the item that dropped | Checking the reply and the side effect |
WHERE THIS PICTURE STOPS
- A vending machine has a few buttons. An API call can take many fields in many combinations.
- A machine drops the item at once. An API may save later or not at all.
- A machine never changes its buttons. An API changes between releases.
HOOK
Good, bad, none, twice, read back.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
Usually write down the expected reply before you send, and afterwards read back what was saved, not just the reply.
| In the trick | What it stands for |
|---|---|
| expected reply | He writes down what he expects before he sends |
| read back | Check the response and any side effects |
A request that only reads data saves nothing, so there is nothing to read back.
TELL A FRIEND
Testing a vending machine means trying right coins, wrong coins, no coins and the button twice. Testing an call means trying good data, bad data, none and a repeat.
OFTEN MIXED UP WITH Reading JSON. The lesson reads a reply. This lesson chooses the requests that produce the replies worth reading.
PRACTISE AND KEEP
Sources for this topic — 23 sources
- Market practice
Write scripts to test API response data in Postman (Postman Learning Center) ↗ — Postman · A Postman test is written with a name and a function, and fails if any check inside fails; checks use the Chai expect style (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Store and reuse values using variables (Postman Learning Center) ↗ — Postman · Postman variables come in five scopes: global, collection, environment, data and local; the narrowest wins (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Newman command reference (Postman Learning Center) ↗ — Postman · Newman runs a collection from the command line and can take an exported environment; its page says Newman is no longer maintained and points to the Postman command line tool (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Usage (Representational State Transfer (REST) Assured library wiki) ↗ — Representational State Transfer (REST) Assured project (GitHub wiki) · REST Assured is a Java library for testing web APIs with a given, when, then layout (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. V27 supplement, 6 November 2026: relevant primary page sections actually opened; implementation-specific current product guidance, not universal standard. See full V27 audit for version and access scope.
- Market practice
Backwards compatibility (Google API design guidance, improvement proposal 180) ↗ — Google (API Improvement Proposals) · Removing a component from an existing API is a break; renaming is a removal plus an addition; adding optional parts is the usual safe change (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
8 November2026 bounded primary update: AIP180 Guidance/Adding/Removing/Renaming/Types/Semantic/default/valueformat selectedpassages read8November2026. Google API guidance, mainlyprotobuf/JSON and multiple independent consumers; source/wire/semantic compatibility and direction matter. Not everyAPI implementation or comprehensive list.
- Market practice
Comprehensive API testing: validating error responses and negative paths (ACCELQ support) ↗ — ACCELQ · Test the happy path and also bad input: 400 for malformed requests, 401 for missing credentials, 403 for missing permission, 404 for a missing item (search excerpt, page not opened; vendor guide)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
How to test Representational State Transfer (REST) APIs step by step (API Challenges, EvilTester) ↗ — EvilTester (Alan Richardson) · Check response headers and body as well as the status code (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
OpenAPI Specification v3.1.0 ↗ — OpenAPI Initiative · A description format for HTTP APIs that lets people and tools find what a service can do (search excerpt, page not opened; source staged by the business analysis batch 13)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
8 November2026 bounded primary-source update: OpenAPI3.1.0 Introduction actually read 8 November2026: interface description for HTTP APIs. Not full OpenAPI audit or a generic live-message contract.
- Market practice
ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Black-box test techniques, equivalence partitioning and boundary value analysis, used here to choose inputs (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)
v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.
Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.
The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.
The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.
7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.
- Market practice
Mass Assignment Cheat Sheet ↗ — OWASP Cheat Sheet Series · OWASP Mass Assignment Cheat Sheet. Search excerpt, page not opened. API3:2023 was seen only as a title.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
API testing pagination: cursor vs offset (QA Skills) ↗ — QA Skills · QA Skills pagination testing and AppSignal offset-versus-cursor pages (search excerpts, pages not opened). Same idea is stated for requirements in ba.api-behaviour-and-postman-checks L4.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Offset and cursor-based pagination in Node.js (AppSignal) ↗ — AppSignal · QA Skills pagination testing and AppSignal offset-versus-cursor pages (search excerpts, pages not opened). Same idea is stated for requirements in ba.api-behaviour-and-postman-checks L4.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Postman Monitors frequently asked questions ↗ — Postman · Says variables changed during a monitor run reach later requests in that run but go back to their original values afterward, and that the Postman API can save them.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Understanding Stateful Testing ↗ — Schemathesis project · Generated operation sequences use response data; OpenAPI connections may come from schema analysis, response URLs or explicit links. (primary page opened and read, 2026-10-21)
Primary page opened and read on 2026-10-21. This does not upgrade other citations or certify the whole competitor catalogue. Daily List examples are synthetic.
- Official requirement
RFC 9110 — HTTP Semantics ↗ — IETF · RFC9110/STD97,June2022:9.1,9.2.1–9.2.2,13.1.2,15.5.2,15.5.4,15.5.6 and15.5.9; safe/idempotent intended effects,401challenge/403refusal,405Allow/501,304conditionalGET/HEAD versus412,408incomplete request (relevant primary passages opened6November2026).
Internet Standard, June 2022, obsoleting RFC 7230 through 7235.
Cited for method semantics only. "Idempotent" in RFC 9110 is a property of a method: that repeating the request has the same intended effect on the origin server. It is not the same claim as "this payment cannot be duplicated", which is a scheme-level guarantee with its own documents.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read in full from the HTTP Working Group's own publication mirror at httpwg.github.io.
- Official requirement
OpenAPI Specification 3.2.1 (10 September 2026) ↗ — OpenAPI Initiative · OAS3.2.1,published10September2026:4.24 Schema Object and2020-12 dialect; explicit type/required and value constraints; tool support separately verified (relevant primary passages opened6November2026).
Opened relevant primary passages on6November2026 via normal web search and document view. Published version and Schema Object4.24 opened. JSON Schema2020-12 default dialect; property/type/value constraints and optional format assertion. Publication is not evidence that any particular tool supports this version.
- Market practice
Newman CLI Overview — Postman documentation Latest (v12) ↗ — Postman · Latest(v12)NewmanCLIOverview:legacycollectionv2.1JSON,no further updates/fixes,currentPostmanCLI supportsv3;record runner/collection versions (relevant primary passages opened6November2026).
Opened relevant primary passages on6November2026 via normal web search and document view. Current vendor page opened: Newman supports collectionv2.1 JSON, not current collectionv3; no further updates or fixes. Postman CLI handles v3. Legacy exercises explicitly retain compatible v2.1 files.
- Market practice
OpenAPI Specification 3.2.1 (10 September 2026) ↗ — OpenAPI Initiative · OAS3.2.1 published10September2026, complete4.20LinkObject and4.24SchemaObject all descendants/examples read7November2026: required/type/value/dialect constraints and design-time links; no tool-support or ownership guarantee.
Opened relevant primary passages on6November2026 via normal web search and document view. Published version and Schema Object4.24 opened. JSON Schema2020-12 default dialect; property/type/value constraints and optional format assertion. Publication is not evidence that any particular tool supports this version.
- Market practice
Backwards compatibility (Google API design guidance, improvement proposal 180) ↗ — Google (API Improvement Proposals) · Complete AIP180 article/examples/changelog read7November2026, substantive changelog21October2025: source/wire/semantic compatibility; optional additions and new enum/default behavior require actual consumer assessment. Google guidance, not universal policy.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
8 November2026 bounded primary update: AIP180 Guidance/Adding/Removing/Renaming/Types/Semantic/default/valueformat selectedpassages read8November2026. Google API guidance, mainlyprotobuf/JSON and multiple independent consumers; source/wire/semantic compatibility and direction matter. Not everyAPI implementation or comprehensive list.
- Market practice
Understanding Stateful Testing ↗ — Schemathesis project · Complete current stable stateful guide read7November2026: inferred/explicit linked sequences, tool-specific extensions and limitations. No actual generator run or full business coverage claimed.
Primary page opened and read on 2026-10-21. This does not upgrade other citations or certify the whole competitor catalogue. Daily List examples are synthetic.
- Market practice
Postman Monitors frequently asked questions ↗ — Postman · Complete Latestv12 monitor FAQ read7November2026: ordinary in-run variable reset versus explicit environment API update; unresolved global-import generalization not promoted.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
AIP158 — Pagination ↗ — Google · Complete public approved AIP158 article/examples/rationale/changelog read7November2026; substantive changelog8July2025. Next token rather than short-page termination; continuation is not authorization or a snapshot guarantee. Google design guidance, not universal protocol.
Complete named units banked under V72 Phase1 gate01d542c62 before implementation; no all-client, whole-document or current tool compatibility certification.
- Market practice
JSON Schema Validation — Draft2020-12 ↗ — JSON Schema authors · Draft2020-12 validation, draft-bhutton-json-schema-validation-01 published16June2022; complete1–6 includingchildren,7.1–7.2.3 and7.3.1 actually read. Internet-Draft, not RFC; required/value constraints and format annotation versus optional assertion. Unread7.3.2+ and linkedCore not certified.
Complete named units banked under V72 Phase1 gate01d542c62 before implementation; no all-client, whole-document or current tool compatibility certification.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.