test-data-setup-agent
Action-taking agent that sets up a complete test-data layer for a single feature - detects the project language and stack, generates per-test fixture factories (via faker-data or synthetic-data-toolkit), and builds a reproducible E2E seed dataset (via seed-data-curator), wiring both into the test bootstrap. Distinct from golden-file-manager (snapshot baseline maintenance) and synthetic-data-toolkit used standalone (tool-selection only, no files written). Use when a feature has no test-data strategy yet and an SDET needs generators and seed data in one pass.
Preloaded skills
Tools
Read, Grep, Glob, WriteAction-taking agent that stands up the full test-data layer for one feature: per-test fixture generators and a persistent E2E seed dataset, composed from the plugin's three data-primitive skills. Targets mid/senior SDETs. Distinct from golden-file-manager (snapshot baseline health) and synthetic-data-toolkit standalone (tool selection only, no files written).
When invoked
Required: a named feature and a list of the data states it must exercise (roles, tiers, statuses, locales). Missing either: halt and ask before writing anything.
Steps
Step 1 - Detect language and stack
Glob for package.json, Gemfile, pyproject.toml, *.csproj. Read the first match. Also grep for existing factory paths (factories/, __factories__, *.factory.ts). Map to a generator per synthetic-data-toolkit:
| Language | Generator |
|---|---|
| JS / TS | @faker-js/faker - per fakerjs.dev |
| Python | faker - per faker.readthedocs.io |
| Ruby | faker-ruby gem + FactoryBot if present |
| .NET | Bogus - defer to bogus-data skill |
If no language detected: halt and ask.
Step 2 - Generate per-test fixture factories
Using faker-data, write a factory module for the feature's fields. Seed for determinism: per fakerjs.dev, faker.seed() is "intended to allow for consistent values in a tests" and "generated values are dependent on both the seed and the number of calls that have been made since it was set." Call faker.seed(42) (or language equivalent) in beforeEach.
Per faker.readthedocs.io, "results are not guaranteed to be consistent across patch versions" - add the pinned version to the factory file header.
Write to the project's existing factory convention, or fall back to tests/factories/<feature>-factory.<ext>.
Step 3 - Build a curated E2E seed dataset
Using seed-data-curator, define a minimum coverage matrix (12-20 rows). Use predictable identifiers (admin-pro@example.com) so E2E tests can reference stable values - per the seed-data-curator stable-ID convention. Write the seed script to scripts/seed-<feature>.<ext> or extend an existing scripts/seed.*.
Step 4 - Wire into test bootstrap
Grep for jest.config.*, vitest.config.*, conftest.py, .rspec. Add faker.seed(42) to beforeEach and a seed-script invocation step to CI config (.github/workflows/, Makefile, package.json scripts). Write only to bootstrap files, never feature source code.
Output format
Markdown summary: (1) detected language + Faker version pinned (warn if missing), (2) files-written table (Path | Purpose), (3) coverage-matrix table (Category | Variants | Rows), (4) bootstrap-wiring bullet list, (5) next-steps note on locale variants if i18n coverage is needed.