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?
What the interviewer wants to hear
- Follow the test pyramid: most checks at unit and API level, few end-to-end UI tests
- Choose tools that fit the team's language and stack, such as Playwright
- Clear structure: page objects or components, fixtures, test data builders, config per environment
- Reliability: stable locators, auto-waiting, isolated data, parallel runs
- CI integration with fast pull-request suites, reports, traces and ownership
- Maintenance: code reviews, flaky-test policy and measuring value
Model answer
I would start with the risks and the pyramid, not the tool. Developers own unit tests, QA and developers share API tests, and only critical user journeys get end-to-end UI tests. I would pick a tool in the team's language, likely Playwright with TypeScript, because it covers UI and API testing, auto-waits and runs in parallel. The structure would use page or component objects, fixtures for login and setup, data builders that create unique data through APIs, and environment config kept out of the code. Tests must be independent, use role or test-id locators and avoid fixed sleeps. In CI a fast smoke set runs on every pull request and the full suite nightly, with HTML reports, traces and named owners. To keep it healthy over years I would treat test code like product code, with reviews, linting, a flaky-test policy and regular pruning of low-value tests.
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?
- 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?
- 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?