Test Data

Test data management patterns for Playwright + TypeScript — decision framework for in-test creation vs precreated DB seed vs read-only fixtures, try/finally cleanup with cleanupNeeded flag (never try/catch), unique-data identifiers for parallel safety (randomNumber, randomElement, getDateNDaysFromNow), step named exactly 'Cleanup'. Use when designing test data strategy, choosing between API setup and UI setup, adding cleanup to a test, fixing test data collisions in parallel runs, or reviewing test data handling.

antongulin d4c6355 9.8 KB Updated

File contents

antongulin/pw-kit/tree/main/skills/test-data commit d4c635502d

Frequently asked questions

npx skillmds@latest add antongulin/test-data