test-data-factory

Generate Swift model fixtures with static factories, builders, and sequence helpers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate test data factories to reduce boilerplate in tests by producing model fixtures with predictable defaults and multiple configuration options.

Core Features & Use Cases

  • Static factory extension for quick, overridable fixtures (fixture and sample)
  • Builder pattern for complex models with fluent configuration
  • Sequence factories for generating multiple unique fixtures
  • Date/time helpers for deterministic test dates
  • Mock response factories to simulate API results

Quick Start

Create a base fixture with Item.fixture() and customize fields as needed for your tests.

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 generating test data for Swift models?

You can reduce boilerplate by generating test data factories that provide static fixtures with predictable defaults. Using a fixture API allows quick, overridable sample data creation, eliminating the need to manually configure every model field in your unit tests.

What is the builder pattern for mock data in Swift unit tests?

The builder pattern for mock data provides a fluent configuration API for complex Swift models. It allows you to methodically override specific default fixture fields step-by-step, ensuring deterministic and scalable test setup without overwhelming initialization parameters.

How do I generate multiple unique test fixtures for Swift sequence tests?

You can generate multiple unique test fixtures using sequence factories. These helpers produce collections of distinct mock data objects, ensuring scalable test setup and covering common scenarios that require lists of deterministic sample models.

Can I simulate API results with mock response factories in Swift tests?

Yes, you can simulate API results using mock response factories. These factories generate fixture data structured to mimic API outputs, allowing you to test parsing and handling logic deterministically without requiring live network requests.

How do I get deterministic test dates for Swift fixture data?

You can get deterministic test dates by using date and time helpers included in test data factories. These helpers provide fixed, predictable timestamps for your model fixtures, preventing time-based flakiness in unit tests.