What components belong in a maintainable test automation framework?
Answer
A framework normally separates test intent from configuration, browser or API drivers, domain actions, test data, assertions, synchronization, setup and cleanup, reporting and diagnostics. It also defines ownership, coding conventions and CI execution. Add abstractions only where they reduce repeated change or make failures easier to understand.
Strong answer includes
- separates concerns without over-engineering
- includes diagnostics and lifecycle control
- treats CI and ownership as framework concerns
Practical example
A team's Playwright framework separates page-object action methods (domain actions) from raw locators (drivers), keeps test data in fixtures loaded per environment, and wraps every assertion with a custom matcher that attaches a screenshot and network log on failure (diagnostics). When a login selector changes, only one page-object file needs updating instead of forty test files — that's the payoff of the separation, and CI fails the build with a linked trace viewer link instead of a bare red X.