Contract Testing interview questions — Hard
123 hard-level Contract Testing questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.
This topic slice is available to practise but is not yet part of our indexed set.
What this covers
Contract Testing appears throughout API Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.
4 example questions
1. Regarding Contract Testing, which of the following is a false statement?
- A. In consumer-driven contracts, the provider dictates what consumers must accept.correct
- B. Provider verification replays consumer interactions against the real provider.
- C. A Pact Broker stores contracts and verification results, enabling can-i-deploy checks.
- D. Breaking changes like removing a response field are exactly what contract tests catch.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
2. Which of the following statements about Contract Testing is FALSE?
- A. In consumer-driven contracts, the provider dictates what consumers must accept.correct
- B. Contract tests are faster and more stable than full end-to-end integration tests.
- C. Schema validation against an OpenAPI spec is a provider-driven contract approach.
- D. Provider verification replays consumer interactions against the real provider.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
3. Identify the INCORRECT statement about Contract Testing:
- A. In consumer-driven contracts, the provider dictates what consumers must accept.correct
- B. Contract tests are faster and more stable than full end-to-end integration tests.
- C. Provider states set up required data before verifying an interaction.
- D. Provider verification replays consumer interactions against the real provider.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
4. Which statement about Contract Testing is NOT correct?
- A. A Pact Broker stores contracts and verification results, enabling can-i-deploy checks.
- B. A Pact Broker executes load tests against providers.correct
- C. Schema validation against an OpenAPI spec is a provider-driven contract approach.
- D. Provider verification replays consumer interactions against the real provider.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.