Consumer Driven Contracts

from Wikipedia, the free encyclopedia

Consumer-Driven Contracts (CDC) is a procedure for testing interfaces within a microservice architecture

This procedure was developed to define the dependencies between (micro) services. The entire interface is not fixed in one scheme. The dependencies are specifically defined for the consumer of an interface in a contract. Only the areas of a result object that are really interesting for the consumer are precisely defined. This has the advantage that the service can further develop and change the interface in the areas that are not referenced by any consumer.

The contracts between the systems are typically checked automatically as part of continuous integration . CDC offer the advantage that there is no need for complex end-to-end tests. A CDC framework is e.g. B. Pact.

Web links

Individual evidence

  1. Why do you want to use Pact. In: Introduction. Retrieved November 10, 2017 .
  2. https://docs.pact.io/ The Pact family of frameworks provide support for Consumer Driven Contracts testing.