Skip to content
Back to skills

Test Data Factories

ASecurity

Create test data with factories and builders: minimal valid defaults, explicit overrides and no shared fixtures

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentstesting

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill test-data-factories --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Data Factories?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Data Factories
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-test-data-factories/badge)](https://www.skillsdirectory.com/skills/ansh44233-test-data-factories)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Create test data with factories and builders: minimal valid defaults, explicit overrides and no shared fixtures
profile: standard
tags: testing, fixtures, factories
---

# Test data factories

Tests should show only the data that matters to them.

## Factories
- One factory per model with minimal valid defaults (factory_bot, factory_boy, Fishery, test builders).
- Override only the fields the test is about; use sequences for unique values.
- Build in memory when persistence isn't needed; create in the DB only for integration tests.

## Isolation
- No shared mutable fixtures across tests; each test creates its own data.
- Wrap DB tests in transactions or truncate between tests.

## Verify
Run the suite in random order (and in parallel if supported) and confirm it passes.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.