Test Data Patterns

Apply the family of test arrangement patterns — Test Data Builder (Nat Pryce & Steve Freeman, GOOS 2009), Object Mother (Peter Schuh, popularised by Martin Fowler 2006), Arrange-Act-Assert (Bill Wake, 2001), Given-When-Then (Dan North, 2006), and chained Test Fixtures — that keep test setup readable, expressive, and robust to change. Covers fluent builders with sensible defaults, semantic builder methods, the Builder + Mother combination, AAA vs GWT, when to introduce a builder, anti-patterns (constructor-with-twelve-params, mystery guests, irrelevant setup), and the project's `Fixture.Given()

5 stars 2 forksTesting & QA Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add vnovakovits/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add vnovakovits/claude-skills --skill test-data-patterns
Manual install
git clone --depth 1 https://github.com/vnovakovits/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/engineering-practices/skills/test-data-patterns ~/.claude/skills/test-data-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Test Data Patterns

Apply this skill when test setup is starting to dominate test bodies, when an object's constructor grows past ~3 parameters, when test data is being copy-pasted between tests, or when reviewing a PR whose tests are technically correct but unreadable. The goal isn't elegant fluent APIs — it's tests that **read like specifications** and **survive refactoring** of the production types they construct.

## Core Philosophy

**Test code is production code.** The same readability and maintainability standards apply. A test that takes 30 lines to set up obscures the behavior it claims to verify.

**Setup is incidental; behavior is essential.** Every line of arrangement that isn't relevant to the scenario steals attention from the line that is. The patterns in this skill are tools for pushing irrelevant setup out of view.

**Test data construction is a design smell amplifier.** When a builder needs 20 `WithX` methods just to construct a domain object, the object is probably doing too much. The friction is feedback.

**Patterns combine.** Builder + Mother + Fixture is the canonical stack: the Fixture frames the test, the Mother names canonical starting points, and the Builder customises the variations.

---

## Pattern 1 — Test Data Builder (Pryce & Freeman, GOOS Ch. 22)

A fluent class whose only job is constructing one type of domain object. Sensible defaults; `WithX` methods for the dimensions that vary; a terminal `Build()` that returns the constructed object.
Read the full skill on GitHub

Details

Skill name
test-data-patterns
Path
plugins/engineering-practices/skills/test-data-patterns/SKILL.md
License
MIT
Repo updated
16 November 2026

FAQ

What does the Test Data Patterns skill do?

Apply the family of test arrangement patterns — Test Data Builder (Nat Pryce & Steve Freeman, GOOS 2009), Object Mother (Peter Schuh, popularised by Martin Fowler 2006), Arrange-Act-Assert (Bill Wake, 2001), Given-When-Then (Dan North, 2006), and chained Test Fixtures — that keep test setup readable, expressive, and robust to change. Covers fluent builders with sensible defaults, semantic builder methods, the Builder + Mother combination, AAA vs GWT, when to introduce a builder, anti-patterns (constructor-with-twelve-params, mystery guests, irrelevant setup), and the project's `Fixture.Given()

How do I install the Test Data Patterns skill?

Claude Code plugin: /plugin marketplace add vnovakovits/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Test Data Patterns popular?

It lives in vnovakovits/claude-skills, which has 5 GitHub stars and 2 forks.

Related skills

Accidental Cio

5

vnovakovits/claude-skills

Apply Scott Millett's "The Accidental CIO — A Lean and Agile Playbook for IT Leaders" (Wiley, 2024) when designing or reviewing how a technology organisation decides, funds, governs and delivers work. Covers the five components of an adaptive IT operating model (organised, work, govern, talent, lead) and its four themes (outcomes over output, intrinsic motivation, being not doing agile, manage flow not people); matching method and governance to context via Cynefin and Wardley evolution; governance as demand management + funding + measurement + decision rights, shifting from project funding to

Frontend & Design

Agent Retro

5

vnovakovits/claude-skills

Run a retrospective on a coding-agent session and improve the agent's environment, not the code. Combines Derby & Larsen's five-stage retrospective, Shigeo Shingo's poka-yoke (turn a mechanical mistake into a check that makes it impossible), and Matt Pocock's retro categories — navigation, automated checks, coding standards, steering files, tool economy, information access. Covers mining the session transcript for corrections, wrong turns and slow searches; deciding where each fix belongs (analyzer, hook, CI, reviewer standards, CLAUDE.md pointer, skill, doc or memory); the no-op test for stee

AI, LLMs & Agents

API Design

5

vnovakovits/claude-skills

Design APIs that are clear, evolvable, and idiomatic to their protocol — covering REST (Fielding, Richardson Maturity Model, Massé), GraphQL, gRPC/protobuf, versioning strategies, pagination, error responses (RFC 7807 Problem Details), idempotency, authentication, documentation (OpenAPI), and the pragmatic trade-offs between RESTful purity and developer ergonomics. Use when designing a new endpoint, choosing between REST/GraphQL/gRPC, defining versioning, structuring error responses, deciding pagination strategy, or evaluating an existing API's evolvability.

Software Development

Test Driven Development

5

vnovakovits/claude-skills

Apply Test-Driven Development to drive outside-in design in small steps. Centers on the London/mockist school (Freeman & Pryce's GOOS, Sandro Mancuso's outside-in teaching) with Kent Beck's classical foundations and Mark Seemann's pragmatic heuristics. Covers sociable vs solitary unit tests and when to prefer each (anticipated refactoring → sociable). Use when starting a new feature, designing object interactions, building a vertical slice end-to-end, deciding what to test next, choosing the test boundary before refactoring, or rescuing a design that resists testing.

Testing & QA

Sdlc

8

Freddy-CHEN-ux/00_claude_skills

SDLC workflow automation that implements features using TDD skill, runs test-runner skill, and prepares commit commands for user review. Use when user provides a spec/plan for a new feature. Workflow: (1) invokes test-driven-development skill with spec, (2) invokes test-runner skill, (3) prepares git commands for user to execute manually.

Testing & QA

Test Fixer

8

Freddy-CHEN-ux/00_claude_skills

MANDATORY when: tests fail, CI fails, CI/CD fails, ci.yml fails, user provides CI log URL. Investigates failures, fixes iteratively until passing.

Testing & QA

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.