How do you manage test data across different environments?
- test data
- data management
- environments
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Strategies by environment: (1) Local/CI: generated test data using factories (faker.js), reset database between test runs. (2) Staging: curated seed data that represents realistic scenarios, refreshed periodically from anonymized production data. (3) Production testing: synthetic test accounts with clear naming conventions (test_*, qa_*), excluded from analytics. Key principles: tests should never depend on pre-existing data, data cleanup should be automatic, sensitive data must be anonymized, and test data should cover edge cases (empty states, maximum values, special characters).
What interviewers listen for
- Risk-based prioritisationYou can defend skipping coverage on a path because the risk maths supports it.
- Test design fluencyYou apply equivalence partitioning and decision tables to concrete inputs in real time.
- Metric judgmentYou distinguish between metrics that drive learning and metrics that drive theatre.
- Strategy under constraintYou can produce a defensible plan when the team has half the time and twice the scope.