test-data-factory

Create test data fixtures and factories for unit tests.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/venomez-viper/PathWise --skill test-data-factory-venomez-viper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-data-factory
Source: https://github.com/venomez-viper/PathWise/tree/main/.claude/skills/testing/test-data-factory
Command: npx skills add https://github.com/venomez-viper/PathWise --skill test-data-factory-venomez-viper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test setup in codebases often requires repetitive boilerplate to create realistic data. This skill provides static factories (fixture() and sample) and builder-pattern helpers to generate consistent test data with minimal code. It reduces maintenance and improves readability of tests by centralizing defaults and common scenarios.

Core Features & Use Cases

  • Static factories: fixture(), sample, and common named presets for quick test data.
  • Builder pattern: fluent, step-by-step construction for complex models.
  • Date and API mocks: helpers to produce deterministic dates and mock API responses.
  • Nested and collection data: supports nested models and lists for realistic scenarios.
  • Extensibility: easy to add new factories for additional models.

Quick Start

Call a factory like Item.fixture() in tests and override only the fields you care about.

Frequently Asked Questions about test-data-factory

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

FAQPage Schema
How do I reduce boilerplate when creating test fixtures for Swift unit tests?

Static factories and builder patterns provide consistent test data with minimal code by centralizing defaults and common scenarios. This reduces maintenance and improves test readability by enforcing defaulting rules for required fields.

How do I generate nested models and collections for unit testing?

Factories support nested models and lists to create realistic test scenarios. You can use the builder pattern for fluent, step-by-step construction of complex nested structures and collections in your test data.

What's the best way to mock API responses and deterministic dates in unit tests?

Date helpers and API response mocks are provided to produce deterministic dates and mock API responses. This ensures consistent test data generation across common testing scenarios without external dependencies.

Does the builder pattern work for creating complex test data variations?

The builder pattern enables fluent, step-by-step construction of complex test data with sequence-based variants across common model types. It is fully extensible, allowing you to easily add new factories for additional models as needed.

Can I use test data factories without adding external dependencies to my Swift project?

Yes, test data factories can be used without external dependencies. The skill operates standalone to provide static factories, builder patterns, and date helpers for generating test fixtures in Swift unit tests.