Spec-First vs Code-First Stubbing
Quick answer Short answer: Code-first stubbing starts from the test and is immediately expressive; spec-first starts from the contract and is correct by construction. The first is a discipline of
Read articleAuthor
Quick answer Short answer: Code-first stubbing starts from the test and is immediately expressive; spec-first starts from the contract and is correct by construction. The first is a discipline of
Read articleQuick answer Short answer: Java stubs are expressive and live in the test code; a spec mock is generated from the contract and serves every language. The first is a
Read articleQuick answer Short answer: WireMock is the JVM standard for code-first HTTP stubbing; Powerduck is a spec-first, language-agnostic mock server. The first is unmatched in code-level control on the JVM;
Read articleQuick answer: WireMock is the open-source standard for HTTP stubbing on the JVM, with deep request matching, stateful scenarios, fault injection, and record-and-replay, plus a managed WireMock Cloud. Powerduck is
Read articleQuick answer Short answer: Record-and-replay captures real traffic and plays it back, which is fast and limited to what happened; a spec mock is generated from the contract, so it
Read articleQuick answer Short answer: Both support stateful behavior, but the source differs. A dedicated mock sequences the states you design; a studio keeps the state tied to the contract and
Read articleQuick answer Short answer: A mock cloud is a paid collaboration layer for a separately maintained mock; a Hub hosts the mock and the docs together from the spec, so
Read articleQuick answer Short answer: Rich templating is a mock designer's strength for bespoke, dynamic responses; a spec-driven mock uses the examples and response schemas you already author. The
Read articleQuick answer Short answer: Both run in CI, but the mock source differs. A dedicated mock CLI runs a separately maintained file; a studio CLI generates the mock from the
Read articleQuick answer: Mockoon is a well-liked desktop tool for designing mock APIs, with strong templating, rule matching, and a CLI for CI. Powerduck is a local-first studio that generates the
Read articleQuick answer Short answer: A mock drifts when it is maintained separately from the API. A contract mock is generated from the spec, so it cannot return a shape the
Read articleQuick answer Short answer: Hand-built routes are precise and a maintenance burden; spec-generated routes are correct by construction and update on save. For a changing API, the generated set is
Read article