Contract Testing in the Testing Pyramid

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

Topic 3 of 9

Published Jul 22, 2024 · Clip 18:35–21:46 (3:11)

Lewis situates contract testing in the testing pyramid: on the consumer side it sits next to unit tests since it intercepts the request-making function, while on the provider side it's more integration-like because a running service replays contracts. He recommends more contract tests than integration/E2E tests but stresses it doesn't replace them—integration tests still cover configuration, business logic, and performance. The host summarizes that contract testing doesn't verify correctness of output values or quality attributes like performance or security.