Dotnet Xunit
Covers xUnit v3 testing for .NET: Fact and Theory attributes, fixtures, parallelism, and IAsyncLifetime setup.
- CCM score
- 50 of 100
- skills.sh installs
- 625
- GitHub stars
- 94
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers
[Fact]and[Theory]with[InlineData],[MemberData], and[ClassData], plus strongly typedTheoryDataRow<T>rows - Includes
IClassFixture<T>andICollectionFixture<T>for sharing expensive resources such as database connections across tests - Notes v2 compatibility differences, including
ValueTaskreturn types for IAsyncLifetime and removed assertion message parameters - Designed for .NET 8.0+ projects that use xUnit v3 or are migrating from v2, with test scaffolding handled by a separate skill
Install
$ npx -y skills add wshaddix/dotnet-skills --skill dotnet-xunit -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
dotnet-xunit
xUnit v3 testing framework features for .NET. Covers [Fact] and [Theory] attributes, test fixtures (IClassFixture, ICollectionFixture), parallel execution configuration, IAsyncLifetime for async setup/teardown, custom assertions, and xUnit analyzers. Includes v2 compatibility notes where behavior differs.
Version assumptions: xUnit v3 primary (.NET 8.0+ baseline). Where v3 behavior differs from v2, compatibility notes are provided inline. xUnit v2 remains widely used; many projects will encounter both versions during migration.
Out of scope: Test project scaffolding (creating xUnit projects, package references, Directory.Build.props) is owned by [skill:dotnet-add-testing]. Testing strategy and test type decisions are covered by [skill:dotnet-testing-strategy]. Integration testing patterns (WebApplicationFactory, Testcontainers) are covered by [skill:dotnet-integration-testing].
Prerequisites: Test project already scaffolded via [skill:dotnet-add-testing] with xUnit packages referenced. Run [skill:dotnet-version-detection] to confirm .NET 8.0+ baseline for xUnit v3 support.
Details
- Repository
- github.com/wshaddix/dotnet-skills
- Categories
- Testing & QA, .NET & C#
- First seen
- Jun 3, 2026
More from wshaddix/dotnet-skills
All 13- Modern Csharp Coding Standards596
- Csharp Wolverinefx576
- Testcontainers573
- Microsoft Extensions Dependency Injection557
- Logging Observability551
- Validation Patterns546
- Project Structure542
- Dotnet Domain Modeling539
- Serialization532
- Microsoft Extensions Configuration529
- Package Management519
- Dotnet Testing Strategy625
Similar to Dotnet Xunit
More Testing & QAcsharp-tunitgithub/awesome-copilot8.9K installsBest-practice guide for writing C# unit tests with TUnit, including data-driven tests and migrating from xUnit.
csharp-testingaffaan-m/ecc10.7K installsC# and .NET testing patterns using xUnit, FluentAssertions, mocking, and integration test setups.
csharp-xunitgithub/awesome-copilot10.5K installsPractical XUnit guidance covering standard facts, data-driven theories, and assertion and isolation conventions for C# tests.
migrate-xunit-to-mstestdotnet/skills4.3K installsConvert xUnit.net v2 or v3 tests to MSTest v4 while preserving the current VSTest or MTP runner.