Skip to content
RED SAGSkills
hardQA Engineer interview question

A product is built from 15 microservices owned by different teams. The shared end-to-end environment is slow and often broken. How would you design the testing strategy?

What the interviewer wants to hear

  • Push most testing into each service: unit, component and API tests with dependencies mocked or containerised
  • Consumer-driven contract tests between services, verified in each provider's CI
  • A small set of critical end-to-end journeys rather than broad E2E coverage
  • Ephemeral or containerised environments and good test data management
  • Observability and testing in production: monitoring, synthetic checks, canary releases and feature flags
  • Handle async messaging and eventual consistency in tests

Model answer

I would stop relying on the shared environment as the main safety net. Each team tests its service in isolation with unit, component and API tests, using containers for its own database and mocks for other services. Consumer-driven contract tests with a tool like Pact then protect the boundaries: consumers publish what they need, providers verify it in CI and a can-i-deploy check blocks breaking releases. On top of that I keep a small set of critical end-to-end journeys, such as sign-up and checkout, run in short-lived environments created per change where possible. Because services talk through events, tests poll for eventual outcomes instead of using fixed waits. Finally I add safety after deployment: canary releases, feature flags, synthetic monitoring and good tracing, so we detect issues quickly when something slips through.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard QA Engineer questions