
Dotnet Xunit
Covers xUnit v3 testing patterns with migration notes for projects still on v2. You'll use this when writing Fact and Theory tests, setting up class and collection fixtures, or dealing with async lifecycle hooks that now return ValueTask instead of Task. The skill draws clear lines between v3's strongly typed TheoryDataRow and v2's object arrays, which matters during upgrades. It assumes your test project is already scaffolded and stays focused on xUnit mechanics rather than broader testing strategy. Good reference for parallelism configuration and the removal of assertion message parameters in v3.
- skills.sh installs
- 619
- GitHub stars
- 90
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshaddix/dotnet-skills --skill dotnet-xunit --agent claude-codeInstalls into .claude/skills of the current project.
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.
Sponsors
Details
- Repository
- github.com/wshaddix/dotnet-skills
- Categories
- Documentation, .NET & C#
- First seen
- Jun 3, 2026
More from wshaddix/dotnet-skills
All 13- Modern Csharp Coding Standards589
- Csharp Wolverinefx572
- Testcontainers569
- Microsoft Extensions Dependency Injection552
- Logging Observability545
- Validation Patterns542
- Project Structure539
- Dotnet Domain Modeling538
- Serialization530
- Microsoft Extensions Configuration528
- Package Management518
- Dotnet Testing Strategy619