Which of the following statements about contract testing is TRUE?
A.
Contract testing, regardless of the approach chosen (provider-driven or consumer-driven) does not need to rely on the creation of stubs/mocks since it is used to implement integration testing, not unit/component testing
B.
Contract testing can be viewed as a specialized form of API testing that can be applied to effectively and efficiently test integration between microservices, but only if they interact with REST APIs
C.
The differences between the two approaches to contract testing stem primarily from which side creates the contract: this creation is done by the provider for the provider-driven approach and by the consumer(s) for the consumer-driven approach
D.
Contract testing can be viewed as a specialized form of API testing that can be applied to effectively and efficiently test integration between systems, but only if they interact synchronously
TAE describes contract testing as verifying that two parties (e.g., consumer and provider services) adhere to an agreed interface contract, enabling earlier, more targeted detection of integration mismatches without requiring full end-to-end integration in every test run. A key distinction in approaches is indeed who defines/publishes the contract. In provider-driven contracts, the provider defines the contract describing what it offers; consumers validate compatibility against it. In consumer-driven contract testing, consumers define expectations (often per consumer), and providers verify they satisfy those expectations. Option A is false because stubs/mocks (or simulated counterparts) are frequently used to allow each side to test independently and deterministically, which is one of contract testing’s practical strengths. Option B is too narrow: contract testing can apply beyond REST (e.g., GraphQL, gRPC, messaging/event contracts). Option D is also too restrictive: it can apply to asynchronous interactions (events/messages) as well as synchronous calls. Therefore, the accurate statement is option C.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit