wshaddix avatar

Dotnet Testing Strategy

This is the strategic layer before you write any tests. It gives you a decision tree for unit versus integration versus E2E, concrete criteria like "pure logic gets unit tests, repository queries get integration tests with real databases," and naming conventions that mirror your source structure. The test doubles section clarifies when to use mocks versus fakes versus stubs with actual behavioral differences, not just definitions. Most useful when you inherit a codebase with inconsistent test patterns or when you're starting a new project and want to avoid the "we have 500 integration tests and they take 20 minutes to run" problem. Pairs with dotnet-add-testing for scaffolding and dotnet-integration-testing for the actual patterns.

skills.sh installs
619
GitHub stars
90
last updated
Aug 21, 2026

Install

$ npx -y skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy --agent claude-code

Installs into .claude/skills of the current project.

Files

dotnet-testing-strategy

Decision framework for choosing the right test type, organizing test projects, and selecting test doubles in .NET applications. Covers unit vs integration vs E2E trade-offs with concrete criteria, naming conventions, and when to use mocks vs fakes vs stubs.

Out of scope: Test project scaffolding (directory layout, xUnit project creation, coverlet setup, editorconfig overrides) is owned by [skill:dotnet-add-testing]. Code coverage tooling and mutation testing are covered by [skill:dotnet-test-quality]. CI test reporting and pipeline integration -- see [skill:dotnet-gha-build-test] and [skill:dotnet-ado-build-test].

Prerequisites: Run [skill:dotnet-project-analysis] to understand the solution structure before designing a test strategy.

Cross-references: [skill:dotnet-xunit] for xUnit v3 testing framework features, [skill:dotnet-integration-testing] for WebApplicationFactory and Testcontainers patterns, [skill:dotnet-snapshot-testing] for Verify-based approval testing, [skill:dotnet-test-quality] for coverage and mutation testing, [skill:dotnet-add-testing] for test project scaffolding.


Test Type Decision Tree

Sponsors

Details

Repository
github.com/wshaddix/dotnet-skills
Categories
Testing & QA, Productivity & Planning, .NET & C#
First seen
Jun 3, 2026

More from wshaddix/dotnet-skills

All 13
1lambdatest avatarplaywright-skilllambdatest/agent-skillsGenerates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java, or C#. Supports local execution and TestMu AI cl554skills.sh installs
2davila7 avatarplaywright-skilldavila7/claude-code-templatesComplete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check respon525skills.sh installs
3aj-geddes avatarfrontend-testingaj-geddes/useful-ai-promptsImplement comprehensive frontend testing using Jest, Vitest, React Testing Library, and Cypress. Use when building robust test suites for UI and integration tes514skills.sh installs
4bmad-labs avatartypescript-unit-testingbmad-labs/skillsUnit testing for TypeScript/NestJS projects using Jest, @golevelup/ts-jest (DeepMocked/createMock), and in-memory databases, with AAA structure. Use whenever th511skills.sh installs
5parcadei avatartestparcadei/continuous-claude-v3Comprehensive testing workflow - unit tests ∥ integration tests → E2E tests503skills.sh installs
6rshankras avatartestingrshankras/claude-code-apple-skillsTDD and testing skills for iOS/macOS apps. Covers characterization tests, TDD workflows, test contracts, snapshot tests, test infrastructure, and deterministic 481skills.sh installs