All 17 sections

How-to › Section 10

Test and mock integrations#

Mocks, record-and-replay, contract and spec-driven tests, and layered SDK test suites, for APIs you ship and APIs you do not own.

7 guides in 2 topics. Every guide compares its approaches and shows the output its commands printed.

Mock an API 4 guides

Standing in for the real thing: Prism from an OpenAPI document, WireMock, MSW, nock, Mockoon, vendor sandboxes, record-and-replay (vcrpy, VCR, Polly.JS, go-vcr, responses, httptest), fault injection (Toxiproxy, chaos flags), and in-SDK mocks (the sdkgen test feature for an in-memory API and netsim for injected latency, 429s and outages as options).

Run contract and spec tests 3 guides

Proving the implementation matches the description: Pact consumer-driven contracts (for an SDK consumer and for a vendor API you call), Schemathesis and Dredd property tests against a spec, Specmatic and Microcks, response validation middleware at runtime, and message contracts for service messages (seneca-msg-test as one option next to Pact message contracts).

All how-to guides

Generate the client instead of writing it#

Retries, timeouts, pagination and auth are the same problems in every client. Voxgig generates them from your OpenAPI description, in 23 languages, from one model.

Get the Voxgig dispatch

Short notes on building SDKs, CLIs, REPLs, and MCPs for API-first teams, plus the occasional Fireside episode pick.

By signing up you agree to our Terms and Conditions.