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. Which of the following statements about Contract Testing is FALSE?
- A. Provider states set up required data before verifying an interaction.
- B. A Pact Broker executes load tests against providers.correct
- C. In consumer-driven contract testing, the consumer defines expectations the provider must verify.
- D. Contract tests are faster and more stable than full end-to-end integration tests.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
2. Regarding Contract Testing, which of the following is a false statement?
- A. Contract tests are slower and flakier than full end-to-end tests by nature.correct
- B. Contract tests are faster and more stable than full end-to-end integration tests.
- C. A Pact Broker stores contracts and verification results, enabling can-i-deploy checks.
- D. Contract testing verifies that a consumer and provider agree on the API's request/response structure.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
3. Which statement about Contract Testing is NOT correct?
- A. Breaking changes like removing a response field are exactly what contract tests catch.
- B. In consumer-driven contracts, the provider dictates what consumers must accept.correct
- C. Contract tests are faster and more stable than full end-to-end integration tests.
- D. Provider states set up required data before verifying an interaction.
Why: The selected statement is false. The other options are accurate statements about Contract Testing.
4. 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.