Design a test automation strategy for a product with 15 microservices, a web app and a mobile app.
What the interviewer wants to hear
- Test pyramid per service: unit, component, contract tests
- Contract testing between services
- Small set of end-to-end journeys across web and mobile
- Environment strategy: ephemeral environments, mocks for third parties
- CI gates by stage with fast feedback
- Ownership, observability and metrics
Model answer
I would build it in layers. Each service team owns unit tests and component tests that run the service alone with its database in containers and mocks for its dependencies. Between services, consumer-driven contract tests with something like Pact catch breaking API changes in the provider's pipeline, which replaces most cross-service E2E tests. The web app has component tests and a focused Playwright suite; the mobile app uses Appium or native tools like Espresso and XCUITest for key flows. On top, a small set of end-to-end journeys, maybe 20, like signup, purchase and refund, run against a full ephemeral or staging environment, with third parties mocked or using sandboxes. CI gates: fast tests on every pull request, contracts before deploy, E2E after deploy to staging, and synthetic monitoring in production. Each test suite has a clear owner, and we track flakiness and duration as team metrics.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Automation Test Engineer questions
- Your regression suite has grown to 3 hours. How do you bring feedback time under 15 minutes?
- What does testing in production mean, and how would you do it safely?
- What is your view on AI-based and self-healing test automation tools in 2026?
- Developers keep changing the UI and breaking your tests. How do you fix this at the team level, not just in your code?
- How do you measure whether your test automation is healthy and worth the investment?
- Your company has 2,000 Selenium tests and wants to move to Playwright. How would you plan the migration?
- The E2E suite fails on about 30% of runs and developers now ignore it. How do you turn this around?
- How do you design automated tests for an event-driven microservices system where services talk through a message broker?
- Your product adds an AI assistant built on a large language model. Its answers vary between runs. How would you automate testing for it?