Comparison
Contract testvsSchema evolution
Contract test
the consumer's expectations are recorded and replayed against the provider's build, so nobody breaks the other by surprise.
A test asserting that a provider satisfies the specific expectations of its consumers, run in the provider's pipeline. It catches integration breakage without a full end-to-end environment, which is the trade that makes it worth the setup. It only covers the interactions consumers actually declared.
Full entry →Schema evolution
you change the message format and have to make sure the consumers still on the old schema can read the new messages.
Managing changes to a serialisation contract so producers and consumers can be deployed independently. Formats like Avro and Protobuf encode the rules — optional fields, reserved tags, never reuse a field number — and a schema registry enforces them. The rules exist because in any rolling deploy the producer and consumer are briefly on different versions.
Full entry →