Philosophy of Consumer-Driven Contract Testing

#184 - Contract Testing Essentials: A Comprehensive Guide - Lewis Prescott

Topic 7 of 9

Published Jul 22, 2024 · Clip 42:19–46:47 (4:28)

Lewis traces the consumer-driven approach to Postel's law—"be conservative in what you do, be liberal in what you accept from others"—and the idea of putting API users first. Contracts narrow requirements to only what will actually be consumed, exposing unused API data points and enabling data-driven API simplification or splitting. He argues that just as developers shouldn't test their own code, consumers should test APIs since they rely on them, though providers still retain negotiating power and can reject unreasonable contract expectations.