Stateful Mocking: WireMock Scenarios vs Spec-Based State
Quick answer: Many APIs are not pure request-response: the response to a second call depends on what the first call did, and a stateless mock that always returns the same
Read articleTopic
Quick answer: Many APIs are not pure request-response: the response to a second call depends on what the first call did, and a stateless mock that always returns the same
Read articleQuick answer: A mock that only returns instant success cannot test how a client behaves when an API is slow, times out, or fails intermittently — and those paths are where
Read articleQuick answer: A mock that returns a fresh resource for every request cannot test the one behavior that makes payment and order APIs safe to retry: idempotency. Replaying the same
Read articleQuick answer: API mocking stands in for a real service with a controllable stand-in that returns canned or spec-driven responses, so frontend, mobile, and integration work can proceed before the
Read articleThe saved request in your API client and the recorded mock were hand-written once and never re-validated. The mock accepts the old payload and local replay stays green until the deployed backend rejects it. Derive examples from the spec, regenerate mocks on change, and validate before replay.
Read articleThe same example payload is usually hand-copied into docs, a mock server, a Postman collection, and test fixtures, and then they drift. OpenAPI examples can drive all four from one document, but only if they are realistic, schema-valid, and cover success, empty, and error states.
Read articleA scanned document is only worth something if the team exercises it. Start a mock for blocked consumers, chain real scenario tests against staging, and serve the spec as an MCP server for internal agents.
Read articleWe pointed Prism, Microcks, Postman mock servers, and a local spec-driven workspace at the same OpenAPI 3.2 document, including an SSE stream. Here is what each handled, what cost money, and where examples quietly became lies.
Read articleA concrete sprint diary: one OpenAPI file drove a local mock with latency and error overrides, a four-step checkout scenario with an HTML report, live docs, derived database tables and a hosted MCP endpoint while the real API did not exist yet.
Read articleFake objects in components demo well and integrate badly. Agree on the coupon validation contract first, then let a spec-driven mock answer real HTTP while the service is still being built.
Read articleMSW intercepts requests inside the browser and shines in component tests; Prism serves a spec over HTTP and validates contracts; spec-driven workspaces add journeys and streams. Here is where each belongs and how teams combine them without maintaining three sets of fixtures.
Read article