"Make External API Dependency Great Again (API Contract Testing)"
summary
Shows a concrete contract-testing setup that catches API surprises before they hit domain code: plain Ruby guarantees and expectations that validate shape and business rules, raw HTTP capture via a sniffer, per-call sampling and hot switch to store full request/response sessions, and usage statistics to spot untaught edge cases. Presents the open source BloodContracts gem, used in production against eBay, Twitter and DHL quirks (e.g. Twitter only returns last-week tweets, DHL adding a warnings field) and reports it works and will be released.
AI-written summary · about
chapters (11)
- 0:00Introduction and background
- 1:25Root cause analysis of API issues
- 4:00Poor boundaries and schema validation
- 7:30Lost in translation and idempotency
- 11:25Design by contracts approach
- 15:47Break and intermission
- 16:08When to apply contracts
- 22:57Highway level communication
- 25:48Introducing Blood Contracts
- 33:05Recap and final thoughts
- 34:32Q&A session
