Boost your confidence with Consumer-Driven Contracts

Azure A July 19, 2018 11:40 am - 12:40 pm

Bookmark and Share

Pedro Tavares

In a monolithic application, we don’t need to worry about breaking contracts between different services because the compiler will do that job for us. If a given method signature changes, the contract between shared services is broken, and the build will automatically fail.

In a microservices application, we have a whole new scenario where different services are deployed in different runtimes and don’t know anything about each other. We don’t have the compiler to detect those breaking changes and they became hard to detect. Usually, they’re found during end-to-end testing in a pre-production environment.

We need to ensure that when we deploy a new service into production, our changes won’t break any consumer; We can do this kind of testing without the need of a real consumer by using consumer-driven contracts.

In this talk, I’ll show you how to implement consumer-driven contracts and we’ll move TDD to the level of software architecture.