test-data-factories

Generate realistic test data with factory patterns and deterministic seeding.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill test-data-factories
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-data-factories
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/test-data-factories
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill test-data-factories

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the fragility and maintenance burden of shared, static test fixtures by providing a framework to generate valid, realistic, and reproducible test data on demand.

Core Features & Use Cases

  • Factory-Based Generation: Replaces brittle YAML or SQL fixtures with dynamic factories that build valid model instances.
  • Object Graph Construction: Handles complex associations and nested relationships without combinatorial explosion.
  • Deterministic Seeding: Supports pinned RNG seeds and locales to ensure CI tests are reproducible and flake-free.
  • Use Case: Use this to seed a development database with realistic user profiles or to generate specific object graphs for unit tests without coupling them to a global dataset.

Quick Start

Use the test-data-factories skill to generate a new user object with an admin role and three associated orders for your current test suite.

Frequently Asked Questions about test-data-factories

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate realistic test data without using brittle shared fixtures?

You can generate realistic test data dynamically by using factory patterns instead of static YAML or SQL fixtures. Factories build valid model instances on demand, eliminating the maintenance burden and fragility of global datasets.

What's the best way to handle complex object graphs and nested associations for integration tests?

The best way to handle complex object graphs is using factory-based generation. Factories construct nested relationships and associations dynamically without causing combinatorial explosion or coupling tests to a shared fixture state.

How do I ensure reproducible test outcomes and prevent flaky tests in CI-CD pipelines?

To ensure reproducible test outcomes, use deterministic seeding with pinned RNG seeds and locales. This guarantees that generated test data remains identical across CI runs, preventing flaky tests caused by random data variations.

Can I use factory patterns to seed a development database with valid user profiles?

Yes, you can use factory patterns to perform idempotent database seeding. This allows you to populate a development database with realistic user profiles and specific object graphs without relying on static fixture files.

Do I need language-specific factory libraries to implement test data factories?

Yes, implementing test data factories requires integration with language-specific factory libraries. These libraries provide the framework to construct valid model instances and support deterministic seeding for your testing environment.

Why use dynamic data generation instead of static fixtures for unit and E2E testing?

Dynamic data generation replaces brittle static fixtures by creating isolated, valid model instances on demand. This prevents unit and E2E tests from coupling to a global dataset, significantly reducing maintenance overhead when models change.