Symmetric API Testing
summary
Claims a concrete pattern: record live HTTP requests and responses, replay them in tests, and auto-generate native types so client and server share the exact contract. Uses Go examples—anaconda client, a tee reader to record responses, go-json to infer structs and go generate to refresh code. Demonstrates a real failure mode (Twitter changed a string into an array) and shows the recorder/replayer approach reduces test fragility, shortens build loops, and keeps client and server compatible.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:03Back to 2006
- 3:04Writing Symmetric API
- 5:30Integration Tests
- 8:27Anaconda
- 9:43JSON Response
- 10:23Response Structure Changes
- 12:03Local Server
- 16:05JSON
- 17:22Ghost Trucks
- 17:48Go JSON
- 18:45Go Generate
- 21:36Using the Interface
- 23:31Parse File
- 27:32Server Logic
- 28:44What to Test
- 30:35Other Tools
- 31:57Summary
related talks
27mEffectively Testing Services
46mRecord-Replay API Test Cases & Data Mocks without writing code
34mAdvanced Testing Techniques in Go
48mClimbing the Testing Pyramid: From Real Service to Interface Mocks in Go
30mBreak the API Test Data Bottleneck: Real Scenarios on Real Systems
14mRecord-Replay API Test Cases with Data Mocks using Keploy
51mFramework agnostic REST api testing
26mTesting HTTP APIs with Ruby
