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 instinctsYou can defend why your suite is shaped like a pyramid, a trophy, or a honeycomb.
- Locator disciplineYou rank selector strategies by stability and explain when to break the rule.
- Flaky test ownershipYou debug to a structural fix instead of retry-until-green.
- Parallelisation literacyYou know how your framework isolates state, fixtures, and database access across workers.