Consumer Driven Contracts

Here at Moonpig Engineering and like many other technology companies we have a service driven application. Our website, iOS and Android apps call these HTTP services over the wire and in our fast paced environment, theses services are constantly changing.

The problem we eventually faced is described by one of our senior technologist’s Philip Wood: 
“ As our technological landscape evolves, the number of services we have increases. As the number of services increases, so does the number of dependencies between them. As the complexity increases, how do we know what service 1 requires of service 2? And how can we be sure that changes we make to introduce service 3 don’t break service 1?

How did we tackle this issue? We implemented Consumer Driven Contracts. What is a Consumer Driven Contract you might ask? As explained on the Pact website:
“A Contract is a collection of agreements between a client (Consumer) and an API (Provider) that describes the interactions that can take place between them.
Consumer Driven Contracts is a pattern that drives the development of the Provider from its Consumerspoint of view.”

Click below to see how we utilise Pact and maintain confidence that if our API’s change our contracts are met!

Like what you read? Give Nainesh Mehta a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.