Exploring consume driven contract testing

Testing an application requires effort and time to do it “properly”, for example, in Succeeding with Agile by Mike Cohn, the pyramid of tests is a guide to understand what amount of tests we should have in an application. Despite the pyramid having no numbers, the proportion is what we should focus on.

On the other hand, Cohn didn’t mention other types s tests that could be beneficial for developers to have in place. Such as Contract Testing. Contract testing is a way to unload the heaviness of integration and even end-to-end tests to give developers faster feedback [1].

In this post, I am going to explore a bit about what is Contract Testing (CT) and what it means for developers to adopt such a strategy.

The need for a contract

Often applications do not survive in isolation, they need to communicate with other services to fulfill business needs.

Resources

References

  1. [1]M. Corporation, “Consumer-driven Contract Testing (CDC),” 2022 [Online]. Available at: https://microsoft.github.io/code-with-engineering-playbook/automated-testing/cdc-testing/. [Accessed: 21-Jun-2021]