test-data-management
Skill1 starsChanged 2 months agoMITView on GitHub
Design test data that makes tests fast, isolated and deterministic — factories over fixtures, per-test tenancy, frozen clocks, seeded randomness, and cleanup strategy. Use when tests interfere with each other, depend on a shared seed database, or fail only in CI.
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Wade-DevCode/awesome-coding-skills-cntheir own version, first seen Nov 8, 2026
- petrkindlmann/qa-skillstheir own version, first seen Oct 25, 2026
- proffesor-for-testing/agentic-qetheir own version, first seen Oct 25, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- proffesor-for-testing/agentic-qe★ 524same name
- petrkindlmann/qa-skills★ 209same name
- Wade-DevCode/awesome-coding-skills-cn★ 7same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- chaos-resilienceSkill
- ci-wiringSkill
- contract-testing-pactSkill
- coverage-ratchetSkill
- database-testingSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- false-positive-hunterSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- mutation-proofSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Read the test and you see exactly which fields drive the assertion.
- Distinctive: line 40
Ordering: never assume database return order.
- Very specific: line 44
Never copy production data into a test environment without anonymization — it is a breach waiting for a screenshot.
- Distinctive: line 50
Prefer strategies that cannot leak: rollback, ephemeral namespace, containerized database per run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Data Management
Most flake and most false positives trace back to data: shared rows, leftover state, a clock that moved, an ID that collided.
Factories, not fixtures
A fixture file is a snapshot of assumptions that rot. A factory is a function with defaults and overrides — the test states only what it cares about:
const user = userFactory({ plan: 'pro' }) // everything else is a sane default
const order = orderFactory({ user, items: [item({ cents: 1000 })] })Read the test and you see exactly which fields drive the assertion. That is the point.
Isolation ladder (pick the highest rung you can afford)
- In-memory / pure — no shared state at all.
- Transaction per test, rolled back after. Fast, total isolation, no cleanup code.
- Namespace per test — unique tenant/org/prefix per test, parallel-safe.
- Truncate between tests — slow, order-sensitive, last resort.
- Shared seeded database — where flake is born. Migrate away.
Parallel workers each need their own namespace or their own schema. A worker id in the tenant
name (tenant-w${process.env.TEST_WORKER_INDEX}) is usually enough.
Determinism
- Clock: inject it.
vi.setSystemTime,freezegun, or aClockport. Nevernew Date()inside code under test without a seam. Test the month-end and DST cases explicitly. - Randomness: seed it, and assert on the seeded output.
- IDs: deterministic in tests (
uuid('order', 1)), so failures are readable and diffs stable. - Ordering: never assume database return order. Assert on sets, or order explicitly.
Sensitive data
Never copy production data into a test environment without anonymization — it is a breach
waiting for a screenshot. Generate realistic-looking data instead (@faker-js/faker,
factory_boy, gofakeit), seeded so it is reproducible.
Cleanup
Prefer strategies that cannot leak: rollback, ephemeral namespace, containerized database per run. If you must delete, do it in a fixture teardown that runs even when the test fails, and verify the teardown ran — a silent teardown failure looks exactly like a flaky test tomorrow.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

