consumer-driven contract testing

  • Consumer-driven contracts are separated into a producer and consumers.

  • Consumer-driven contract testing verifies that the producer provides a contract that fulfils all consumers’ expectations.

  • Consumers verify that the producers still provide the structure of messages and behavior they need.

Contract testing

  • A contract describes how components communicate and interact with each other, both message formats between components (syntax) as well as behavioral expectations of components (semantics).

  • You use contract testing to verify that contracts between components are honored;

    • this gives you confidence that the components are able to work together

  • When you use test-specific dependent components (such as test doubles), you can also use contract testing to make sure that they honor the latest or any specific version of the contract.

PACTS

Spring consumer driven contracts

Last updated

Was this helpful?