“Quality cannot be inspected into a product or service; it must be built into it.”
W Edwards Deming
CD Requires Fast Feedback
- ✔️ Independent deployability
- ✔️ Automation
- ✔️ Shifting feedback left
- ✔️ Collaboration over handoffs
End to End
- Speed of feedback
- Reliability of feedback
- Managing unowned dependencies
"Any advantage you gain by talking to the real system is overwhelmed by the need to stamp out non-determinism"
"Push tests as low as they can go for the highest return in investment and quickest feedback"
Janet Gregory and Lisa Crispin
Decomposing what we do:
- Connectivity - Mocks and Smoke Testing
- Conversation - Contract Testing
- Conduct - Contracts, Monitoring, User Journeys
Capture service communication in a contract
- Consumer of a service
- 🧪 Write unit tests demonstrating usage
- 📜 Run tests against a mock to generate contracts
- 💾 Upload to Broker during CI
A Pactfile viewed in the Pact Broker UI
Does this build satisfy the consumer's contracts?
- 📜 Retrieve mainline contract for each consumer
- 🧪 Start service (mock upstream dependencies)
- 🚀 Launch Pact mock client
- ✔️ Verify service's responses against contract
- 💾 Upload verification results to Broker
When a new consumer contract is published...
- ⚡ Special CI provider job triggered by Broker
- ✔️ Runs provider verification against new contract
- 💾 Upload verification result to Broker
Time to Deploy!
Deploy consumer (when provider isn't deployed)
Deploy consumer (with unsupported changes)
- Provider States
- Pending Pacts
- WIP Pacts
- Bi-directional Contract Testing