Skip to main content

How do you design a test automation framework from scratch?

  • framework design
  • architecture
  • test infrastructure

Answer it first, then compare. Nothing here is saved or scored.

Model answer

Start with goals: what types of tests (UI, API, visual), what browsers/platforms, what CI integration. Architecture layers: test runner (Playwright/Jest), page objects or component abstractions, test data management (factories/fixtures), reporting (Allure, HTML), and CI integration. Key decisions: parallel execution strategy, environment configuration, retry policies, and screenshot/video capture for failures. Start with a few critical path tests and expand. Avoid over-engineering, build what you need now.

What interviewers listen for

  • Test architecture instincts
    You can defend why your suite is shaped like a pyramid, a trophy, or a honeycomb.
  • Locator discipline
    You rank selector strategies by stability and explain when to break the rule.
  • Flaky test ownership
    You debug to a structural fix instead of retry-until-green.
  • Parallelisation literacy
    You know how your framework isolates state, fixtures, and database access across workers.

See all 35 automation questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026