CS FundamentalsVery hardProduct-company microservices interview

An Orders service consumes a Pricing service's API. The teams want to catch breaking API changes before deployment without spinning up both services in a full end-to-end environment. Which technique fits best?

  1. A. Smoke testing in production
  2. B. Load testing the Pricing service
  3. C. Manual exploratory testing
  4. D. Consumer-driven contract testing: the consumer's expectations are recorded as a contract and verified against the provider in its own pipeline

Correct answer: D. Consumer-driven contract testing: the consumer's expectations are recorded as a contract and verified against the provider in its own pipeline

Contract tests check that the provider still satisfies what each consumer actually uses, in isolation and quickly. They catch breaking changes that unit tests miss without the cost and flakiness of full end-to-end tests.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic