dotnet-test

Run targeted .NET tests with xUnit using build-first workflows and filters.

137|20|Updated Jun 13, 2025
One-click install
npx skills add https://github.com/NikiforovAll/claude-code-rules --skill dotnet-test-nikiforovall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-test
Source: https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-dotnet/skills/dotnet-test
Command: npx skills add https://github.com/NikiforovAll/claude-code-rules --skill dotnet-test-nikiforovall

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables a build-first, test-targeted workflow to run .NET tests efficiently, reducing feedback time by building the solution once and focusing on the tests you care about.

Core Features & Use Cases

  • Build-first validation: Compile the solution with minimal output to catch errors early.
  • Targeted testing: Run specific test projects with --no-build to avoid redundant compilation.
  • Flexible filtering: Narrow down results using test filters to run only the relevant tests.
  • Use Case: When you have a large solution, run the entire build to catch compile errors, then execute only the tests for a selected project or scenario.

Quick Start

Run a focused test for a project: dotnet test path/to/Tests.csproj --no-build --filter "Name~ShouldWork"

Frequently Asked Questions about dotnet-test

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

FAQPage Schema
How do I run specific .NET tests without rebuilding the entire solution?

Use dotnet test with the --no-build flag to skip recompilation and run only targeted tests. This works after an initial dotnet build, allowing you to iterate quickly on specific test projects or filtered test methods without redundant compilation overhead.

Can I filter xUnit tests by method name or class in .NET?

Yes, dotnet test supports --filter expressions to narrow results by fully qualified name, class name, or method name patterns. For example, --filter "Name~ShouldWork" runs only tests matching that pattern, reducing feedback time on large test suites.

What's the fastest way to validate a large .NET solution during development?

Run a build-first workflow: execute dotnet build once to catch compilation errors, then run targeted dotnet test commands with --no-build on specific test projects or filtered tests. This minimizes redundant builds and focuses feedback on the code you're changing.

Does dotnet test support parallel test execution for faster feedback?

Yes, dotnet test includes parallelism controls to execute tests concurrently, accelerating overall test time. Combined with targeted filtering and --no-build usage, this delivers quick actionable results for debugging and optimization in CI and local development.

How do I configure test output and logging when running dotnet test?

dotnet test accepts logger options to control verbosity and output format. Pair this with filters and --no-build to generate minimal, focused output that surfaces only the test results and diagnostics relevant to your current debugging or optimization task.