Simulating and Testing Third Party Service Integrations
summary
A small Ruby library called request interceptor simulates HTTP services using a concise Sinatra app per service, runs as a Rack middleware in development, and records transactions for assertions via an RSpec matcher. It supports every HTTP client that web mock supports (work was done to integrate with web mock), can raise simulated infrastructure errors, and generates factory-backed JSON responses. It scales to large codebases (Shopify example: ~800 engineers) and fits into a 25 minute demo.
AI-written summary · about
chapters (5)
- 0:00Start
- 2:24Managing External Dependencies
- 7:37Request Interceptor
- 14:53Simulate Infrastructure Errors
- 17:14Organize Our Interceptors
related talks
29mForeign API Simulation with Sinatra
26mTesting HTTP APIs with Ruby
28mTesting HTTP APIs in Ruby
27mEffectively Testing Services
36mAn Introduction to Spies in RSpec
32mFuture-Proofing Your 3rd Party Integrations
33mSmart Integration Tests with Smart Mocks
12mAn Approach to Developing and Testing Third Party JavaScript Widgets
