4 Implementing consumer-driven contract testing for web applications
This chapter covers
- Guidelines in writing consumer contract tests
- Contract testing tooling setup for the consumer
- Writing consumer contract tests between a web application and data provider
- Publishing contracts to a Pact Broker
At this point, we hope you’re itching to start writing your first contract test! As mentioned in chapter 2, it’s always better to start with the “Why” and to understand what pain points contract testing is trying to solve before you rush in to try it out just because someone told you to. Building on the Why, it’s essential to have a solid understanding of the core concepts and principles of contract testing. If you feel that you want to read the previous chapters again to solidify your knowledge further, please go ahead. We’d rather you make sure you fully understand how contract testing works before trying out the implementation part.