2025-01-09
When Contract Tests Miss the Mood of an API
By Amelia Ko
Contract testing captures shapes, not semantics. A field can be optional in OpenAPI yet culturally required by every frontend consumer. When mood diverges, teams experience silent drift.
Capture “mood clauses” in your API coverage workbook: who consumes the field, what happens if it disappears, and whether customer support scripts mention it. Pair that with a Newman assertion that is deliberately soft—warning channel instead of hard fail—until consumers update.
In the API Coverage Workshop we simulate a billing endpoint where cents rounding flips on locale. The schema passes while accounting screams.
Document these scenarios beside your automated suite so new testers know where human review stays mandatory. Automation should shrink repetitive checks, not pretend taste is binary.
Revisit mood clauses quarterly; product vocabulary shifts faster than JSON Schema versions.