dotnet-testing

Define .NET testing strategies covering unit, integration, E2E, and quality gates.

Updated Dec 20, 2023
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill dotnet-testing-thiago-cruz-eng
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-testing
Source: https://github.com/Thiago-Cruz-eng/Hibrygame/tree/main/.claude/skills/dotnet-testing
Command: npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill dotnet-testing-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you replace ad-hoc testing with a consistent, production-grade .NET testing strategy that covers unit, integration, and end-to-end quality gates without gaps.

Core Features & Use Cases

  • Testing strategy selection: Choose the right test type (unit vs integration vs E2E) and the right test doubles using a decision framework.
  • Framework-ready .NET test authoring: Implement xUnit v3 patterns including fixtures and async lifecycles.
  • Quality gates that prevent regressions: Add coverage collection (coverlet), test quality tooling (Stryker.NET), snapshot verification (Verify), and performance regression checks (BenchmarkDotNet + CI thresholds).
  • Real-world infrastructure testing: Validate HTTP and middleware behavior with WebApplicationFactory, databases and services with Testcontainers, and multi-service apps with .NET Aspire testing.
  • UI/end-to-end confidence: Run browser E2E tests with Playwright, with CI caching, trace debugging, and maintainable selectors.

Quick Start

Use the dotnet-testing skill to design and implement a complete .NET testing setup that uses xUnit v3 for unit/integration tests, Verify for snapshots, Playwright for E2E UI checks, and BenchmarkDotNet for CI performance regression gating.

Frequently Asked Questions about dotnet-testing

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

FAQPage Schema
How do I choose between unit, integration, and E2E tests for my .NET application?▼

You choose the right .NET test type by evaluating whether to verify isolated logic with unit tests, validate real infrastructure with integration tests using WebApplicationFactory and Testcontainers, or execute browser E2E tests with Playwright. A decision framework helps select the correct test type and appropriate test doubles.

How do I set up integration testing for .NET with real databases and services?▼

To set up .NET integration testing, use WebApplicationFactory to validate HTTP and middleware behavior, Testcontainers to validate databases and services, and .NET Aspire for multi-service app testing. This approach validates real infrastructure without gaps.

Can I use xUnit v3 fixtures and async lifecycles for .NET testing?▼

Yes, you can use xUnit v3 for .NET testing by implementing patterns that include fixtures and async lifecycles. This framework-ready approach allows you to author unit and integration tests with consistent technical requirements and safe test practices.

What is the best way to prevent performance regressions in .NET CI pipelines?▼

The best way to prevent .NET performance regressions is to use BenchmarkDotNet with CI thresholds to establish performance regression checks. This creates quality gates that ensure your code maintains expected performance standards throughout the pipeline.

Does .NET testing with Playwright support CI caching and trace debugging?▼

Yes, .NET testing with Playwright supports CI caching, trace debugging, and maintainable selectors for UI and end-to-end confidence. This browser E2E testing approach ensures reliable regression prevention for your web applications.

When should I use snapshot testing versus unit testing in .NET?▼

You should use snapshot testing with Verify in .NET when you need to verify complex object states or outputs that are difficult to assert manually, whereas unit testing with xUnit v3 is better for isolated logic. A decision framework helps select the correct test type and appropriate test doubles.