dotnet-test_skill

This skill helps you run targeted .NET tests quickly by guiding a build-first, test-targeted workflow with xUnit filters.

83

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill nikiforovall/claude-code-rules --skill dotnet-test

  • SKILL.md7.7 KB

Overview

This skill helps you run .NET tests selectively using a build-first, test-targeted workflow optimized for fast developer feedback. It focuses on xUnit and gives concrete commands and filter patterns to run only the tests you need. Use it to reduce iteration time while keeping compile-time verification.

How this skill works

First, build the entire solution with minimal output to catch compile errors once. Then run tests for a specific test project with --no-build to skip redundant compilation. Use xUnit-friendly filter expressions (prefer FullyQualifiedName and DisplayName) to run single methods, classes, theory parameter cases, traits, or combined conditions.

When to use it

  • You want fast feedback on a small set of tests during development.
  • You need to run a specific test method, class, or theory case without rebuilding everything.
  • You need to filter xUnit Theory tests by parameter values.
  • You want to see ITestOutputHelper output from xUnit while keeping overall noise low.
  • You need to exclude slow or flaky categories from quick runs.

Best practices

  • Always build the solution first: dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal to surface compile errors early.
  • When running tests, pass --no-build to dotnet test to skip redundant compilation and speed runs.
  • Prefer FullyQualifiedName~ for reliable filtering of classes and methods; use DisplayName~ to target Theory parameter values.
  • Use --logger "console;verbosity=detailed" to see ITestOutputHelper output and grep to remove discovery noise when needed.
  • Keep filters focused (use & and | operators) to combine class, method, and display-name criteria for precise runs.

Example use cases

  • Run all tests in a project quickly without rebuilding: dotnet test path/to/Tests.csproj --no-build.
  • Run a single unit test method: dotnet test --no-build --filter "FullyQualifiedName~MyNamespace.MyClass.MyTestMethod".
  • Run a specific Theory case by parameter value: dotnet test --no-build --filter "DisplayName~admin_user".
  • Exclude slow integration tests in local runs: dotnet test --no-build --filter "Category!=Slow".
  • Combine class and parameter filters: dotnet test --no-build --filter "FullyQualifiedNameOrderTests&DisplayNameUSD".

FAQ

--no-build skips compilation so tests run faster when you already built the solution. Build first to catch compile errors once, then use --no-build for repeated test runs.

Which filter property is most reliable for xUnit?

FullyQualifiedName is the most reliable for class and method filtering. Use DisplayName for Theory parameter values because xUnit includes parameter values in the display name.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational