Contract testing
Contract testing ensures that a component has not broken its contract with its consumers. When we looked at the Trilateral API pattern, we highlighted that this contract includes both the component's synchronous interface and the event types that it publishes through its asynchronous outbound interface. The contract tests ensure that any enhancements to a component are at least backward compatible with its consumers.
An interesting twist with contract tests is that the component team does not implement them. Instead, these tests are implemented by the consuming team and then submitted to the component team as a pull request. This approach is referred to as consumer-driven contract testing. When creating a deployment roadmap ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access