Scenario: "The team uses Pact for consumer-driven contract testing." What is consumer-driven contract testing?
Consumer-driven contracts: consumer generates pact file → provider verifies → both know integration is safe. Pact: most common framework. vs. integration testing: no shared environment needed.
Scenario: "The consumer pact failed provider verification." What does this mean and what is the resolution?
Failed verification — root cause types: missing field (provider removed it), changed type, unexpected status code. Resolution: should provider fix, or should the contract change?
Scenario: "We use a compatibility matrix to track which consumer version is compatible with which provider version." Why is this important?
Compatibility matrix: rows = consumer versions, columns = provider versions, cells = compatible/incompatible. "Can I deploy provider v2.3 given consumer v1.8 is in production?" Pactflow manages this with can-I-deploy.
Scenario: "The contract test uses the provider state: 'a user with ID 42 exists'." What is a provider state?
Provider states: consumer says "when X state exists, calling endpoint Y returns Z". Provider sets up state (seed test data, mock, or fixture). Enables isolated, deterministic contract tests.
Key vocab:provider state, precondition for interaction, state setup, deterministic test input.
5 / 5
Scenario: "The data engineering team applies contract testing to pipelines differently than HTTP service contracts." What is the key difference?
Data contracts in practice: dbt schema tests (column presence, type, not_null, unique, accepted_values, relationships), Soda checks for freshness/volume/distribution, Great Expectations for complex statistical rules.