🔌Contract Testing
Also known as Consumer-Driven Contract Testing, API Contract Test, Pact Testing
Tests that check an API and the apps that call it still agree.
Think of it like
Think of it like two people signing the same deal. Each one checks they keep their side of it.
Example
Emma's app expects an order to have a total field. When Jack renames it on the server, the contract test fails before release.
Why it matters
It catches changes that break other teams, without running the whole system.
Definition
Common mistake
Key takeaways
- 1One contract. Requests and answers both sides expect.
- 2Both sides tested. Caller and API, apart.
- 3Catch breaks early. Before either side ships.