Skip to content
RED SAGSkills
hardQA Engineer interview question

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.

Start mock interview

More hard QA Engineer questions