dotnet-testing

Structure unit, integration, and E2E tests for ASP.NET Core applications.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/tassosgomes/poc-iam-service --skill dotnet-testing-tassosgomes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-testing
Source: https://github.com/tassosgomes/poc-iam-service/tree/main/.github/skills/csharp/dotnet-testing
Command: npx skills add https://github.com/tassosgomes/poc-iam-service --skill dotnet-testing-tassosgomes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skill provides a comprehensive, opinionated framework for testing .NET C# and ASP.NET Core applications, helping teams reduce bugs, shorten feedback loops, and improve code quality.

Core Features & Use Cases

  • Structured unit tests following the AAA pattern with xUnit, Moq, and AwesomeAssertions.
  • Integration testing using WebApplicationFactory and Testcontainers to spin up real postgres databases.
  • End-to-end (E2E) tests with Playwright to validate user flows and UI behavior.
  • Dev Containers workflows to ensure isolated, repeatable test environments and reliable CI/CD.

Quick Start

Install the required testing libraries and start by adding unit tests for critical services following the AAA pattern.

Frequently Asked Questions about dotnet-testing

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

FAQPage Schema
How do I structure integration testing in ASP.NET Core using Testcontainers?

Integration testing in ASP.NET Core uses WebApplicationFactory with Testcontainers to spin up real postgres databases. This approach provides containerized integration environments for reliable test automation and isolated test data management.

What's the best way to organize xUnit test projects for .NET applications?

Organizing xUnit test projects involves separating unit, integration, and E2E tests into distinct projects following structured conventions. The framework recommends documenting these conventions in SKILL.md to maintain scalable test data management across teams.

Can I use Playwright for E2E testing with ASP.NET Core services?

Yes, Playwright is used for End-to-End (E2E) testing with ASP.NET Core services to validate user flows and UI behavior. It integrates into the testing workflow alongside xUnit unit tests and Testcontainers integration tests.

Do I need Dev Containers to run reliable .NET test automation?

Dev Containers are recommended to ensure isolated, repeatable test environments and reliable CI/CD for .NET testing. They provide containerized integration environments that support consistent test execution across development teams.

How does the AAA pattern work with xUnit and Moq for .NET unit testing?

The AAA pattern structures unit tests into Arrange, Act, and Assert phases using xUnit, Moq, and AwesomeAssertions. This structured approach reduces bugs and shortens feedback loops in .NET C# applications.

Why use Testcontainers for .NET integration tests instead of mocked databases?

Testcontainers spins up real postgres databases for integration testing, providing more reliable validation than mocked databases. This containerized approach ensures isolated, repeatable test environments for ASP.NET Core services.