13 / 89 · 04 API & Contract Testing with AI · Consumer-Driven Contract Testing with Pact← prev⊞ allnext →☰ Read as one page
3.1The Problem Pact Solves
In a microservices architecture, service A calls service B. If B changes its API, A breaks. But B's own tests pass because B does not know about A's expectations. Consumer-driven contracts flip this: the consumer (A) publishes a contract describing what it expects, and the provider (B) verifies it can fulfill that contract.