Three teams keep breaking each other's services with API changes. Someone proposes contract testing. How do you introduce it without a six-month programme?
Show the full answer Hide the answer
Start with one pair, not with the estate
Pick the pair of services that has broken each other most recently. Instrument that one relationship end to end: the consumer's tests generate its expectations, those are published, and the provider's pipeline verifies against them and fails on a mismatch.
The blocking gate is the point. Contract testing that reports rather than blocks prevents nothing; it documents the breakage after it ships.
Doing one pair takes days rather than months, and it produces the artifact that makes the case: a real breaking change caught in the provider's pipeline instead of in the consumer's environment.
Then expand along the actual pain
Rank the integrations by how often they have broken, and work down. Most estates have a small number of relationships responsible for most incidents, and stopping there is a legitimate outcome — universal coverage is not the goal, fewer incidents is.
The two operational details that decide whether it survives
Which consumer versions matter. Verifying against every expectation ever recorded means a long-dead consumer blocks the provider forever. The registry has to know what is actually deployed.
A route through for intended breaking changes. Version the interface, run both, and have the gate enforce that the old expectations still pass until the last consumer has moved. Without this, the first legitimate breaking change gets the gate disabled.
What it replaces
An integration environment that runs everything together. That is worth saying explicitly, because contract testing is often perceived as additional work. It is substitutional: it catches compatibility problems earlier, faster, and without requiring an environment that hosts the whole estate.
The cultural half
The contracts make consumers visible. A provider that could previously change anything now has named counterparties. That is the intended effect and it needs stating, because the first reaction from a provider team is usually that they have lost autonomy — when what they have gained is knowing who breaks when they change something.