Testing Patterns

Write readable, deterministic .NET tests with xUnit, FluentAssertions, NSubstitute, and focused integration patterns. Use when adding unit tests, API tests, persistence tests, or improving positive and negative coverage.

9 stars 5 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add DIL8654/claude-code-dotnet-template --skill testing-patterns
Manual install
git clone --depth 1 https://github.com/DIL8654/claude-code-dotnet-template.git /tmp/claude-code-dotnet-template
mkdir -p ~/.claude/skills
cp -r /tmp/claude-code-dotnet-template/.claude/skills/testing-patterns ~/.claude/skills/testing-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

# Testing Patterns Skill

Write tests that are readable, deterministic, and aligned with real application behavior.

## When to Use
- Adding unit tests for domain or application logic
- Adding integration tests for API endpoints
- Testing EF Core mappings and persistence behavior
- Improving failure-path coverage

---

## Quick Reference: Common Issues

| Issue | Symptom | Impact |
|-------|---------|--------|
| Brittle assertions | Tests depend on exact formatting or ordering unnecessarily | Fragile test suite |
| Over-mocking | Every dependency mocked, including trivial ones | Tests drift from real behavior |
| Missing negative cases | Happy path only | Regressions slip through |
| Non-deterministic setup | Real time, random values, shared state | Flaky tests |
| Incorrect test level | HTTP semantics tested only with unit tests | Gaps in real behavior coverage |

---

## Test Stack Defaults

- xUnit for test execution
- FluentAssertions for intent-revealing assertions
- NSubstitute for substitutes and mocks
- `WebApplicationFactory` for API integration tests
- SQLite or Testcontainers for persistence behavior when needed

---

## Unit Test Patterns

### Focus on Behavior
Read the full skill on GitHub

Details

Skill name
testing-patterns
Path
.claude/skills/testing-patterns/SKILL.md
License
GPL-3.0
Repo updated
24 March 2026

FAQ

What does the Testing Patterns skill do?

Write readable, deterministic .NET tests with xUnit, FluentAssertions, NSubstitute, and focused integration patterns. Use when adding unit tests, API tests, persistence tests, or improving positive and negative coverage.

How do I install the Testing Patterns skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add DIL8654/claude-code-dotnet-template --skill testing-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Testing Patterns popular?

It lives in DIL8654/claude-code-dotnet-template, which has 9 GitHub stars and 5 forks.

Related skills

API Contract Review

9

DIL8654/claude-code-dotnet-template

Review ASP.NET Core Web API contracts for HTTP semantics, versioning, backward compatibility, and response consistency. Use when the user asks to review an API, check endpoints, validate REST behavior, or before releasing contract changes.

Marketing, Sales & Business

Architecture Review

9

DIL8654/claude-code-dotnet-template

Review Clean Architecture boundaries, dependency direction, layering decisions, and abstraction quality in .NET solutions. Use when evaluating project structure, new dependencies, service boundaries, or architectural drift.

Software Development

Azure Integration

9

DIL8654/claude-code-dotnet-template

Add Azure services to .NET applications with Managed Identity, typed options, infrastructure isolation, and production-safe configuration. Use when wiring Key Vault, App Configuration, Storage, Service Bus, or Azure Identity patterns.

DevOps & Cloud

Testing and Benchmark

9

oceanbase/oceanbase-skills

Run OceanBase functional tests and performance benchmarks through obd test, including mysqltest, Sysbench, TPC-H, and TPC-C. Use for correctness testing, benchmark preparation, load execution, result analysis, or cleanup. Do not use for ordinary tenant or cluster lifecycle work.

Testing & QA

Large Skill

9

HaasStefan/skills-lint

This skill has an override for gpt-4o with higher thresholds and is used for testing override resolution.

Testing & QA

Coverage Guard

4

sametcelikbicak/coverage-guard

Use when the user wants to check test coverage, enforce 100% coverage, find uncovered code, add missing tests, or increase code coverage. Works with vitest, jest, react-scripts, and other test runners. Also for 'coverage', 'test coverage', 'cover', 'untested', 'uncovered', 'add tests for', 'increase coverage', 'coverage report', 'write tests', 'test all files'.

Testing & QAIn 1 list

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