Skip to content
Preptima
mediumConceptDesignScenarioMidSenior

Two teams own two services that talk to each other. How do you stop one breaking the other without running both together in a shared environment?

4 min readUpdated 2026-08-15

Answer

Short answer

Contract testing has each side verify itself against a shared description of the interaction, so consumer expectations are checked against the provider's real behaviour without the two ever running together.

Was this answer helpful?

Likely follow-ups

  • A provider adds a required request field. Which pipeline goes red, and when?
  • How is this different from publishing an OpenAPI spec and validating against it?
  • What does contract testing not catch that you still need an end-to-end test for?
  • Who owns the contract, and what happens when a consumer wants a field the provider will not add?

Related questions

Further reading