Contract tests check agreements between services, such as field names, types, and status codes. They help independently deployed consumers and providers detect compatibility breaks.
The demo compares requested fields with a provider response and marks a missing field. Passing a contract does not prove the full user journey, which needs separate coverage.
When to use
Use it when providers and consumers of an API are deployed independently.