Contract Tests for Reliable Service Boundaries
Distributed systems fail in an awkward place: each service can pass its own tests while the interaction between two services is incompatible.
A provider may rename a JSON field, tighten validation, change an enum, or stop returning a value that a consumer quietly depends on. Contract tests make those cross-service assumptions executable.
What a contract is A contract describes an observable interaction between a consumer and a provider.
For an HTTP API, it might specify: