Pact and consumer-driven contracts — ensure API compatibility between services without end-to-end tests.
Five passes over the same idea, each from a different angle. Do them in order, or jump to whichever you need.
Contract testing verifies that API producers and consumers agree on the interface. Consumer-driven contracts (Pact) let consumers define expectations that producers verify. This catches breaking changes early without slow E2E tests. Ideal for microservices where teams deploy independently.