test-data-factory

Generate deterministic .fixture() extensions and builders for Swift model types.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill test-data-factory-jtvaris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-data-factory
Source: https://github.com/jtvaris/sunday-night-dynasty/tree/main/.agents/skills/testing/test-data-factory
Command: npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill test-data-factory-jtvaris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate reusable test data fixtures to reduce boilerplate in unit tests and ensure deterministic test data.

Core Features & Use Cases

  • Static factory methods for model fixtures (e.g., Item.fixture()) to quickly create common test data.
  • Builder pattern support for complex models with many optional fields.
  • Date and API response helpers to generate time-stable test data and mock API results.
  • Collection and sequence factories for bulk or iterative test scenarios.
  • Clear naming conventions and nested fixture usage to maintain readability.

Quick Start

Call Item.fixture() to generate a ready-to-use test item and override only the fields relevant for your test.

Frequently Asked Questions about test-data-factory

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

FAQPage Schema
How do I generate Swift test fixtures without writing repetitive boilerplate code?

Generate Swift test fixtures without boilerplate by using static factory methods like Item.fixture() that provide ready-to-use model instances, allowing you to override only the fields relevant to your specific unit tests.

What is the builder pattern for mock data and when should I use it in Swift unit tests?

The builder pattern for mock data creates complex Swift models with many optional fields by providing default values and allowing selective overrides. Use it in unit tests when you need deterministic data without specifying every model property manually.

Can I generate bulk test data collections for Swift unit testing?

Yes, you can generate bulk test data collections for Swift unit testing using collection and sequence factories, which create multiple fixture instances for iterative or bulk test scenarios while maintaining deterministic data.

How do I create time-stable mock API responses for Swift unit tests?

Create time-stable mock API responses for Swift unit tests using date helpers and API response factories that generate deterministic timestamps and static mock results, ensuring your test data remains consistent across test suite executions.

Does this test data factory approach work with nested model structures in Swift?

Yes, this test data factory approach works with nested model structures in Swift by applying clear naming conventions and nested fixture usage, inspecting your models to generate readable .fixture() extensions for complex nested types.

What is the best way to reduce boilerplate when mocking Swift model types?

The best way to reduce boilerplate when mocking Swift model types is to generate deterministic test data factories that inspect your models and automatically create .fixture() extensions and builders, eliminating manual fixture setup code.