Gateway Gus saysContract testing verifies that a provider and consumer agree on the API shape.
When teams own different services, integration breaks when one changes the contract unexpectedly. Contract testing (e.g. Pact) captures the consumer's expectations and verifies the provider still meets them — in CI, before deploy. It catches breaking changes earlier and cheaper than full end-to-end tests, without needing both systems live at once.
Power-ups you unlock
Verifies provider ↔ consumer agree on the shape
Pact captures consumer expectations
Catches breaking changes in CI
Cheaper than full end-to-end tests
Timeout Titan attacks — common mistakes
No contract tests between separately-owned services
Relying only on slow E2E for integration
Changing a contract without re-verifying consumers
Boss battleExplain how a contract test catches a breaking field rename before deploy.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>consumer expects: { "name": ... }
provider renames to "fullName"
→ contract test FAILS in CI, before deploy</pre></body></html>