Art of Unit Testing
Apply Roy Osherove's "The Art of Unit Testing" (Manning — 2nd ed. 2013 in C#/.NET, 3rd ed. 2024 in JavaScript) — the practitioner's guide to writing trustworthy, maintainable, readable unit tests. Centers on Osherove's broad unit-of-work definition (entry point → observable exit point), his three-part test-naming convention (UnitOfWork_StateUnderTest_ExpectedBehavior), the stub-vs-mock distinction by whether you assert against the double, the one-mock-per-test rule, designing for testability via seams (dependency injection, Extract-and-Override), and getting legacy code under test. Use when wr
Install
/plugin marketplace add vnovakovits/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add vnovakovits/claude-skills --skill art-of-unit-testinggit 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/art-of-unit-testing ~/.claude/skills/art-of-unit-testingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# The Art of Unit Testing (Roy Osherove) Apply this skill when the question is **"how do I write *this* unit test well — what do I call it, how do I structure it, and what do I fake?"** Osherove's book is the practitioner's field manual: less a taxonomy (that's Meszaros) and less a trade-off calculus (that's Khorikov) than a set of concrete, opinionated, repeatable habits for the test you are about to type. Its single most-cited contribution — and the main reason to reach for this skill — is the **three-part naming convention**. This skill deliberately overlaps with `unit-testing-principles` (Khorikov) and `xunit-test-patterns` (Meszaros); where it does, it states **Osherove's distinct position** rather than repeating theirs. Read the "Where Osherove differs" notes inline. ## Core Philosophy **A unit test is automated, fast, isolated, repeatable, self-checking, and consistent.** Osherove's working definition: a unit test exercises a *unit of work* in the system and then checks a single *end result* of that unit. If the assumptions about the end result turn out wrong, the unit test has failed. A unit test runs entirely in memory, controls its own world, and gives the same answer no matter who runs it, in what order, on which machine.
Details
- Skill name
art-of-unit-testing- Repository
- vnovakovits/claude-skills
- Path
plugins/engineering-practices/skills/art-of-unit-testing/SKILL.md- License
- MIT
- Repo updated
- 16 November 2026
FAQ
What does the Art of Unit Testing skill do?
Apply Roy Osherove's "The Art of Unit Testing" (Manning — 2nd ed. 2013 in C#/.NET, 3rd ed. 2024 in JavaScript) — the practitioner's guide to writing trustworthy, maintainable, readable unit tests. Centers on Osherove's broad unit-of-work definition (entry point → observable exit point), his three-part test-naming convention (UnitOfWork_StateUnderTest_ExpectedBehavior), the stub-vs-mock distinction by whether you assert against the double, the one-mock-per-test rule, designing for testability via seams (dependency injection, Extract-and-Override), and getting legacy code under test. Use when wr
How do I install the Art of Unit Testing 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 Art of Unit Testing popular?
It lives in vnovakovits/claude-skills, which has 5 GitHub stars and 2 forks.
Related skills
Accidental Cio
5vnovakovits/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
Agent Retro
5vnovakovits/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
API Design
5vnovakovits/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.
Condition Based Waiting
8Freddy-CHEN-ux/00_claude_skills
Use when tests fail intermittently. Replace arbitrary timeouts with condition polling. Eliminates flaky tests caused by timing assumptions.
Replay Demo
9Lord1Egypt/RA-Skills
Synthetic localhost skill for testing Browserbase session replay playback.
Gameplay Browser
8Freddy-CHEN-ux/00_claude_skills
Test game via browser with Chrome DevTools. Navigate UI, play through game flow, observe behavior and report issues.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.