Skip to content

Add skill - test-data-management #31

Description

@miroslavpojer

Summary

Add a test-data-management skill that provides structured guidance on creating, organising, and maintaining test data — fixtures, factories, builders, and seed sets — across Python, TypeScript, and Scala test suites.

Motivation

Three existing skills — test-unit-write, test-unit-standards, and test-unit-review — redirect test data questions to a test-data-management skill that does not exist yet. Users asking "how should I structure fixtures for complex objects?", "factory vs fixture — which should I use?", or "my test data is leaking between tests" are not served by any current skill.

Proposed scope

The skill should cover:

  • Strategy selection — when to use inline literals, fixtures, factories, builders, or seed files; decision table by data complexity and reuse surface
  • Implementation guidance — language-specific recipes:
    • Python: pytest fixtures (scope, autouse, parametrize), factory_boy, polyfactory, Faker
    • TypeScript/Jest: beforeEach setup, object-mother pattern, faker-js, fishery
    • Scala/MUnit: FunSuite fixture methods, ScalaCheck generators, custom builders
  • Isolation rules — no shared mutable test data; scope fixtures to the narrowest lifecycle needed; reset strategies (truncation, transactions, in-memory)
  • Anti-patterns — global mutable singletons, production database seeds in unit tests, hardcoded IDs that collide, over-specified data hiding intent
  • Parametrization — table-driven tests, property-based generation, boundary value sets
  • Relation to test-unit-write — the writer skill delegates data-setup decisions here; this skill must be compatible with that handoff

Acceptance criteria

  • SKILL.md with frontmatter (name, description, license, compatibility)
  • Description triggers correctly on fixture/factory/seed/test-data intent, and does NOT trigger on general write/review/standards requests
  • Language reference files under references/ for at least Python and TypeScript
  • evals/evals.json with ≥ 5 trigger and ≥ 3 body evals
  • Cross-skill NOT: pointers updated in test-unit-write, test-unit-standards, and test-unit-review to reference this skill by name

Related skills

  • test-unit-write (upstream delegator — data setup)
  • test-unit-standards (peer — fixture reuse and isolation rules)
  • test-unit-review (peer — flags test data violations)
  • test-mocking-patterns (sibling new skill)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions