| name | dotnet-test |
| description | This skill should be used when running .NET tests selectively with a build-first, test-targeted workflow. Use it for running tests with xUnit focus. |
| allowed-tools | Bash(dotnet build:*), Bash(dotnet test:*), Read, Grep, Glob |
.NET Test Runner
Run .NET tests selectively using a build-first, test-targeted workflow optimized for development speed.
Core Workflow
Follow this workflow to run tests efficiently:
Step 1: Build Solution First
Build the entire solution with minimal output to catch compile errors early:
dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal
Step 2: Run Specific Project Tests
Run tests for the specific test project with --no-build to skip redundant compilation:
dotnet test path/to/project --no-build --verbosity minimal
Step 3: Filter When Targeting Specific Tests
Narrow down to specific tests using filter expressions:
dotnet test --no-build --filter "FullyQualifiedName~MyTestMethod"
dotnet test --no-build --filter "FullyQualifiedName~MyTestClass"
dotnet test --no-build --filter
dotnet --no-build --filter