An API contract records what a service consumer expects and what a provider promises to deliver. Contract tests check that both sides still agree. section 8.5.2
Use the contract to make service expectations explicit:
- Have the consumer declare a request and its expected response. section 8.5.2
- Verify that the provider returns the expected response; fail tests when either side changes incompatibly. section 8.5.2
- Treat passing tests as evidence that specified requirements hold, not proof of deeper correctness. section 8.3.7
Parser in a rendering service
A content management system sends markup such as `# Hello` and expects HTML such as `<h1>Hello</h1>`. Contract tests catch parser changes that break that expectation. section 8.5.2

























































