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.
More hard QA Engineer questions
- A critical bug reached production even though QA tested the release. How do you handle it and what do you change afterwards?
- Which quality metrics would you track for a product team, and which would you avoid?
- How would you test an integration with a third-party payment gateway that you do not control?
- Your team finds most bugs late, just before release. How would you shift quality earlier in the process?
- How would you test a feature whose output is not fixed, such as an AI chatbot or a recommendation engine?
- You join a company with no automation. How would you design a UI and API test automation framework that will still be healthy in three years?
- You are not a penetration tester, but you are the only QA on the team. How do you include security testing in your everyday work?
- The full regression suite takes six hours, so the team releases only once a week. How would you get feedback down to under 30 minutes without losing confidence?
- How would you design the test strategy for releasing a mobile banking app on iOS and Android every two weeks?