Skip to main content

Consumer-Driven Contract Testing Checklist

A practical, interactive checklist for verifying that two independently-deployed services โ€” a consumer and a provider โ€” actually agree on the shape of the data crossing between them, before that assumption breaks in production.

Use this tool to track your contract-testing setup; progress is saved automatically in your browser's local storage.

Checklist Completion

Track your testing preparations live. Your progress is saved automatically.

0 of 15 items completed0% Done
๐Ÿค1. Contract Ownership & Definition
0/3
Contract expectations are written and owned by the consumer, not the provider.
Example: The checkout service (consumer) defines exactly which fields it needs from the payments service (provider) response โ€” not the other way around.
Every field's type, nullability, and format is explicitly declared, not inferred from one example payload.
Example: `amount` is documented as a string in minor units (`"1050"` for $10.50), not silently assumed to be a float.
Each contract is versioned and tied to a specific consumer/provider pair.
Example: `checkout-service-v2` consumes `payments-service-v3` โ€” the pairing itself is a trackable artifact, not folklore.
๐Ÿงช2. Consumer-Side Tests
0/3
Consumer tests run against a contract-generated mock of the provider, not a live call.
Example: Pact (or an equivalent) intercepts the HTTP call and returns exactly the mocked contract response โ€” the real payments service is never hit in a consumer test.
Every consumer interaction the code actually depends on is recorded as a distinct contract interaction.
Example: A "get payment status = FAILED" case is a separate recorded interaction from "get payment status = SETTLED" โ€” not folded into one generic happy-path mock.
Consumer-side contract interactions include realistic error/edge responses, not only 200 OK.
Example: A 404 for an unknown payment ID and a 503 during provider maintenance are both recorded interactions, not just the success case.
โœ…3. Provider-Side Verification
0/3
The provider runs a verification step that replays every consumer-recorded interaction against its real implementation.
Example: The payments service's CI pipeline pulls every consumer's contract and asserts its actual responses still match, before any deploy.
Provider verification sets up the exact state each interaction expects, not shared fixture data.
Example: Verifying the "payment status = FAILED" interaction actually seeds a failed payment in the provider's test database first.
A provider change that breaks any consumer's contract fails CI before merge, not after deploy.
Example: Renaming a field from `txn_id` to `transactionId` fails the provider's own build the moment a consumer contract still expects `txn_id`.
๐Ÿ“ก4. Contract Broker & Change Visibility
0/3
Contracts are published to a shared, queryable location โ€” not scattered across teams' own repos.
Example: Both the checkout team and payments team see the current, live contract state via a Pact Broker (or equivalent), not by asking in Slack.
Deployability is checked automatically against the broker before either side ships.
Example: A "can-i-deploy" gate blocks the payments service's release if any consumer hasn't yet verified compatibility with the new version.
A provider change automatically notifies/triggers re-verification for every affected consumer.
Example: Publishing a new payments-service contract kicks off checkout-service's CI to re-verify against it, without a human remembering to ping them.
๐Ÿ“5. Scope, Units & Type Safety
0/3
Numeric fields with a unit are explicit about which unit, not just a bare number.
Example: `thrust_impulse_newton_seconds` rather than an ambiguous `impulse` field โ€” the exact class of defect that destroyed the Mars Climate Orbiter.
A schema/type linter runs in CI to catch unit or type drift between consumer expectation and provider reality.
Example: An automated check flags if a provider's OpenAPI spec changes a field from integer to string without a corresponding contract update.
Contract tests are understood as a complement to, not a replacement for, end-to-end integration tests.
Example: A handful of real end-to-end smoke tests still run against a live staging environment; contract tests exist to catch drift fast and cheap, not to be the only integration signal.

Consumer-Driven Contract Testing Flowโ€‹


Why This Existsโ€‹

Two services can each pass 100% of their own tests and still break each other the moment they talk โ€” a renamed field, a silently-changed unit, or a status code neither side actually agreed on. Contract testing catches that class of defect at the speed of a unit test, without needing a slow, flaky, fully-integrated environment for every single check.