Consumer-Driven Contract: A better approach for API Testing
summary
Advocates replacing brittle mocks and slow end-to-end suites with consumer-driven contracts that generate Pact files from consumer tests, publish them to a Pact Broker, and have providers verify against those contracts by running an actual service and a state setup endpoint that seeds test data. Example builds a movies/reviews microservice pair, uses the Pact framework for JS providers and consumers, runs a year-long POC, and reports fewer integration breakages while requiring nontrivial CI/DevOps work to tag and verify contracts across teams.
AI-written summary · about
chapters (16)
- 0:00Start
- 5:55End-to-End Testing
- 7:53Testing Pyramid
- 8:51Contract Testing
- 9:30Consumer-Driven Contracts
- 10:56How Would You Approach Contract Testing in Your Team
- 14:13Api Integration Testing
- 15:13How Would We Do It with Contract Testing
- 19:31Response Contract
- 21:53Provider Side Testing
- 23:38State Management
- 25:59Bad Practices in General around Contract Testing
- 26:50Benefits of Contract Testing Right Consumer-Driven Contracts
- 29:40Package Manifest
- 30:15Tagging a Contract
- 30:56How Would You Compare Packed with Postman for Contract Testing
related talks
09m"Contract Testing 101"
01h 00mTesting Microservices and Evolving APIs with Consumer Driven Contracts
47mContract-Based Testing for Microservices and UI
01h 13mContract Testing Made Easy: Master Pact for Microservices in C#
24mHow to test microservices and stay sane
59mUsing Pact to Deploy Microservice with Confidence
23mContract Testing for Mobile Application Development
22mCollaborating with Contracts
