Why should you read this article ?
If you develop or maintain micro-services you already asked yourself those questions :
CDC is an answer to those questions.
Let’s discover what is behind, let’s go to the upside-down !!!
How can we test this simple integration ?
We can use a mock of the API to design our client integrations. With mocks, we do not need to set up a whole runtime environment. We can run isolated tests between the client and a mock of the API.
To test interfaces between a client and an API the most used technique is end-to-end testing. In end-to-end tests (E2E tests), real servers or containers are set up so that client and provider are available in a production-like runtime environment.
To execute integration tests, the client is usually triggered by providing certain input in the user interface. The consumer then calls the provider and the test asserts if the results meet the expectations defined in the contract.
Consumer-Driven Contract approach as an alternative