Skip to main content

How do you handle test data management in automation?

  • test data
  • fixtures
  • test isolation

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

Model answer

Approaches by maturity: (1) Seed data in test setup, API calls or DB seeds before each test. (2) Factory pattern - generate unique data per test run to avoid conflicts. (3) Fixtures - Playwright fixtures provide scoped setup/teardown. (4) Isolated environments - Docker containers with known state. Key principle: each test should be independent and create its own data. Never rely on shared mutable state between tests.

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