Skip to content
RED SAGSkills
mediumAutomation Test Engineer interview question

How would you design a test automation framework from scratch for a web app?

What the interviewer wants to hear

  • Choose language and tools that match the team and app
  • Clear structure: tests, page or component objects, fixtures, utilities, test data
  • Configuration for environments and secrets
  • Reporting, logging, screenshots and traces
  • Parallel execution and CI integration
  • Coding standards and code review

Model answer

I start with the context: the app's stack, the team's language skills and the browsers we must support. For a modern web app with TypeScript developers, I would pick Playwright Test, so developers can contribute too. The structure has folders for tests grouped by feature, page or component objects, fixtures for setup like authenticated users, API clients for data setup, and test data factories that create unique data. Configuration handles base URLs per environment through environment variables, with secrets kept out of the code. I add tagging for smoke and regression, retries only in CI and with flakiness tracking, and reports with traces, screenshots and videos on failure. Tests run in parallel and sharded in GitHub Actions. I add linting, including no-floating-promises, and code review rules. Finally I document how to write a new test so the framework is easy to adopt.

Can you answer it under time pressure?

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

Start mock interview

More medium Automation Test Engineer questions