Data-driven frameworks run the same test logic against many input rows. Keyword-driven frameworks describe steps as reusable keywords, often in tables. BDD writes behaviour as Given/When/Then scenarios shared with the business. Most real frameworks are hybrids: code-first tests, parameterized data and page objects.
Full answer with examplesInterview questions / Quality Engineering
Framework Design Interview Questions
The senior-level round: how you structure a framework, manage test data, handle configuration and keep a suite fast and maintainable as it grows.
6 questions · 1 beginner· 3 intermediate· 2 advanced
beginner questions
intermediate questions
What layers does a maintainable test automation framework have?
intermediate 2–5 yrs
Separate concerns: tests that read like scenarios, a domain or flow layer, interaction layers (page or component objects, API clients), core utilities (driver lifecycle, config, data builders, waits), and reporting. Dependencies point downward only, so a UI change touches one page object, not hundreds of tests.
Full answer with examplesHow do you manage test data in an automation framework?
intermediate 2–5 yrs
Prefer each test creating the data it needs through APIs or builders, with unique values so tests can run in parallel and in any order. Keep shared seed data read-only, clean up or use disposable environments, never rely on production copies with real personal data, and keep data creation out of the UI.
Full answer with examplesKeep one typed config object loaded in a clear precedence order: defaults, then an environment file selected by a single variable, then environment variables or CLI overrides. Never commit secrets; inject them from the CI secret store or a vault at runtime, mask them in logs, and fail fast on missing values.
Full answer with examplesadvanced questions
First reduce what must run as UI tests by pushing checks down to API and component level. Then make every test independent with API-based setup and reused auth state, shard across many parallel workers on scalable infrastructure, balance shards by historical duration, and track flaky and slow tests as defects.
Full answer with examplesHow would you migrate a large Selenium suite to Playwright?
advanced 5+ yrs
Start with a clear reason and a measured baseline, prove value with a pilot, then migrate incrementally while both suites run. Prioritise high-value and flaky tests, rewrite rather than transliterate (auto-waiting locators, fixtures, API setup), delete low-value tests, and retire the old suite in planned stages.
Full answer with examples