run-tests

Executes .NET tests by detecting platform and framework, with filtering options.

5.1k|377|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/dotnet/skills --skill run-tests-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-tests
Source: https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/run-tests
Command: npx skills add https://github.com/dotnet/skills --skill run-tests-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you reliably execute .NET tests, whether you need to run all tests, a specific subset, or troubleshoot execution issues across different platforms and frameworks.

Core Features & Use Cases

  • Platform & Framework Detection: Automatically identifies whether your project uses VSTest or Microsoft.Testing.Platform (MTP), and detects the test framework (MSTest, xUnit, NUnit, TUnit).
  • Flexible Test Execution: Runs tests using dotnet test with support for various filters, target frameworks, and logging options.
  • Use Case: You have a .NET project with xUnit tests and need to run only the tests tagged with "Integration" and that are not marked as "Slow". This Skill can determine the correct filter syntax for your project's setup and execute those specific tests.

Quick Start

Run all tests in the current project directory using the detected test platform and framework.

Frequently Asked Questions about run-tests

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

FAQPage Schema
How do I run dotnet tests for a specific framework like xUnit or NUnit?

You can run dotnet tests by automatically detecting the test framework, whether it is xUnit, NUnit, MSTest, or TUnit. The Skill identifies your project setup and executes the tests using the appropriate command-line arguments for your specific framework.

Can I filter .NET test execution to exclude tests tagged as Slow?

Yes, you can filter .NET test execution by applying specific criteria to include or exclude tagged tests. It determines the correct filter syntax for your project's platform and executes only the targeted test subset, such as excluding tests marked as Slow.

Does this tool support both VSTest and Microsoft.Testing.Platform?

Yes, this tool fully supports both VSTest and Microsoft.Testing.Platform (MTP). It automatically detects which test platform your .NET project utilizes and handles the appropriate command-line arguments for the detected runner across different SDK versions.

What is the best way to execute integration tests in a .NET project?

The best way to execute integration tests is by using flexible test filtering with dotnet test. This approach allows you to target only the tests tagged with Integration while excluding others, ensuring precise test execution across your detected platform and framework.

Why does my dotnet test command fail across different .NET SDK versions?

Dotnet test commands may fail due to mismatched runner arguments across different SDK versions. This Skill handles command-line arguments for both VSTest and Microsoft.Testing.Platform runners, ensuring correct test execution regardless of your installed .NET SDK version.

How do I troubleshoot .NET test execution issues for specific platforms?

To troubleshoot .NET test execution issues, you can rely on automatic platform detection to correctly identify VSTest or MTP. It ensures the proper command-line arguments are applied for your specific setup, resolving common execution errors across frameworks.