Contract testing, explained
In consumer-driven contract testing, popularised by tools such as Pact, each consumer records the interactions it depends on, and the provider verifies every change against those contracts in CI.
Contracts capture what consumers say they rely on. They complement OpenAPI diffs, which check the published schema, and traffic replay, which checks real behavior.
Related terms
- Breaking change: A breaking change is a change to an API that causes a correctly written client, which worked before, to fail or behave differently without modifying its code.
- OpenAPI Specification: The OpenAPI Specification is a standard, language-agnostic format (YAML or JSON) for describing HTTP APIs: their paths, operations, parameters, schemas and authentication.
- Backward compatibility: An API change is backward compatible when every client built against the previous version keeps working, with the same behavior, after the change ships.