Keep useful API cases with every change.

Carry reviewed API inputs and a clear application assertion from a local fix into review and your existing CI suite. A teammate or runner can exercise the same condition without waiting for the shared sandbox to fail.

Catch a regression when a read dependency stays unavailable

northline / web-clientPull request

Handle activity lookup failures#184

fix/activity-retriesmainChecks
Retry exhaustionExpected 3 attempts. Observed 4.
Failed
Fixture preflight503 · reviewed fixture
Verify retry limit4 / 3 attempts
activity.retry.spec.tsexpect(attempts).toHaveLength(3)Received 4
Inspect attempt log
  1. Attempt 1503
  2. Attempt 2503
  3. Attempt 3503
  4. Attempt 4503Beyond limit

When to use it

A fixture needs enough context to survive the handoff.

Choose a stable API case that protects an outcome customers depend on. Start with one assertion your existing runner can explain, such as the maximum attempt count after a dependency stays unavailable.

What to check

Reviewed case
A read dependency returns HTTP 503 for every application attempt.
Runner preflight
The runner confirms the expected status, body and response source before testing the client.
Application check
The check fails if it observes four attempts where the client is expected to stop at three and report a terminal error.

How to approach it

Run regression checks in CI

4 steps

  • API fixtures
  • Git
  • Your CI runner
  1. Version the case with the assertion it protects

    Store the reviewed inputs, route configuration, starting state and expected result. Keep raw capture data and credentials out of the repository. A prepared synthetic service model needs its own review, compile, apply and import steps before the runner uses its fixtures.

  2. Prepare an isolated run

    Use a supported stack with pinned versions. Wait for setup, load the library and explicitly select MOCK. Reset the application database or caches independently, and give concurrent jobs separate mutable test state.

  3. Verify that the dependency is ready

    Send one known request and check status, body and response source. Check separately for unintended upstream requests. Report a failed preflight as a setup or fixture problem so it stays distinguishable from a failing application assertion.

  4. Run the test command and retain the evidence

    Use your existing test runner to assert the attempt limit and terminal error. Preserve the case version, preflight result and failing request or assertion before teardown. Review fixture updates as deliberately as code changes.

What this gets you

Give every reviewer the same starting point

A reviewed API case, its matching service setup and a three-attempt limit are available to the next developer, reviewer and CI run.

What the check tells you

A passing run covers the selected requests and client assertions. Maintain separate live checks where you need the upstream’s current contract, credentials or network behavior.

Where Gostly fits

Your team supplies stack setup, routing and assertions. Compile and apply code models before importing their fixtures. Keep live integration checks separate and review data before sharing or exporting it.

More worked examples

Compare sample API conditions with the checks your application can run.

Keep CI running without a live sandbox

Authored worked example · synthetic data

A known ready-order response while the sandbox is unavailable

The authored baseline is a ready USD order with an integer amount. Three controls show what this declared consumer accepts or refuses; they are local response checks rather than a completed CI run.

Example inputs and caller-owned checks
Your actionAPI conditionYour test checks
Inspect the baseline200; matching order; amount_minor 4200; USD; readyAccept under usd-ready-order-v1; add the application assertion separately
Add an optional trace fieldThe baseline also contains trace_idAccept because the consumer permits unrelated fields
Change the amount to a stringamount_minor is the string 4200Refuse because the consumer requires a non-negative safe integer
Change USD to EURThe JSON shape stays the same while the currency changesRefuse under this consumer's USD-only rule, not a universal currency rule

This is a workflow for the complete self-hosted stack. Plan for its runner resources, startup, license checks and configured operational connections.

CI integration setup

Inspect the response-contract exercise and downloads →

Give new engineers a useful API to learn against

Authored worked example · synthetic data

A first change to the order history screen

Use synthetic order examples for a populated list, an empty list and an unavailable dependency. The task is to make each screen state useful, then explain which API condition drives it.

Example inputs and caller-owned checks
Your actionAPI conditionYour test checks
Install and check the prepared serviceThe library is ready in MOCK modeConfirm the client request reaches the reviewed example
Open a populated order historyA synthetic list of orders is returnedDisplay the expected rows without a production account
Use the empty and failure casesEach selected example supplies its intended conditionCheck the empty state and useful error message
Review the first changeThe same library supports the reviewer’s local runExplain the covered cases and what still needs a live check

A recording is not automatically safe onboarding data. Credential headers, local replay bodies, processed library data and imported files have different handling rules; review the material you share.

Follow the quick start

Your next change

Give the next engineer and CI run a useful starting point.

Prepare the next feature's dependency