run-tests

Solid

Runs .NET tests with dotnet test. Use when user says "run tests", "execute tests", "dotnet test", "test filter", "filter by category", "filter by class", "run only specific tests", "tests not running", "hang timeout", "blame-hang", "blame-crash", "TUnit", "treenode-filter", or needs to detect the test platform (VSTest or Microsoft.Testing.Platform), identify the test framework, apply test filters, or troubleshoot test execution failures. Covers MSTest, xUnit, NUnit, and TUnit across both VSTest and MTP platforms. Also use for --filter-class, --filter-trait, and other framework-specific filter syntax. DO NOT USE FOR: writing or generating test code, CI/CD pipeline configuration, or debugging failing test logic.

Testing & QA 3,219 stars 238 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Run .NET Tests Detect the test platform and framework, run tests, and apply filters using `dotnet test`. ## When to Use - User wants to run tests in a .NET project - User needs to run a subset of tests using filters - User needs help detecting which test platform (VSTest vs MTP) or framework is in use - User wants to understand the correct filter syntax for their setup ## When Not to Use - User needs to write or generate test code (use `writing-mstest-tests` for MSTest, or general coding assistance for other frameworks) - User needs to migrate from VSTest to MTP (use `migrate-vstest-to-mtp`) - User wants to iterate on failing tests without rebuilding (use `mtp-hot-reload`) - User needs CI/CD pipeline configuration (use CI-specific skills) - User needs to debug a test (use debugging skills) ## Inputs | Input | Required | Description | |-------|----------|-------------| | Project or solution path | No | Path to the test project (.csproj) or solution (.sln). Defaults to current directory. | | Filter expression | No | Filter expression to select specific tests | | Target framework | No | Target framework moniker to run against (e.g., `net8.0`) | ## Workflow ### Quick Reference | Platform | SDK | Command pattern | |----------|-----|----------------| | VSTest | Any | `dotnet test [<path>] [--filter <expr>] [--logger trx]` | | MTP | 8 or 9 | `dotnet test [<path>] -- <MTP_ARGS>` | | MTP | 10+ | `dotnet test --project <path> <MTP_ARGS>` | **Detection files to always check...

Details

Author
dotnet
Repository
dotnet/skills
Created
3 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

filter-syntax

Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation. DO NOT USE directly — loaded by run-tests, mtp-hot-reload, and migrate-vstest-to-mtp when they need filter syntax.

3,219 Updated today
dotnet
Testing & QA Solid

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", or mentions EnableMSTestRunner, EnableNUnitRunner, UseMicrosoftTestingPlatformRunner, or dotnet test exit code 8. Supports MSTest, NUnit, xUnit.net v2 (via YTest.MTP.XUnit2), and xUnit.net v3 (native MTP). Also covers translating xUnit.net v3 MTP filter syntax (--filter-class, --filter-trait, --filter-query). Covers runner enablement, CLI argument translation, Directory.Build.props and global.json configuration, CI/CD pipeline updates, and MTP extension packages. DO NOT USE FOR: migrating between test frameworks (MSTest/xUnit/NUnit), xUnit.net v2 to v3 API migration, MSTest version upgrades (use migrate-mstest-* skills), TFM upgrades, or UWP/WinUI test projects.

3,219 Updated today
dotnet
Data & Documents Solid

platform-detection

Reference data for detecting the test platform (VSTest vs Microsoft.Testing.Platform) and test framework (MSTest, xUnit, NUnit, TUnit) from project files. DO NOT USE directly — loaded by run-tests, mtp-hot-reload, and migrate-vstest-to-mtp when they need detection logic.

3,219 Updated today
dotnet
Testing & QA Listed

tunit

Run TUnit tests with Playwright. Use when user asks to run tests, execute tests, or check if tests pass.

335 Updated today
aiskillstore
Testing & QA Listed

dotnet-add-testing

Adds test infrastructure to a .NET project. Scaffolds xUnit project, coverlet, layout.

0 Updated 3 months ago
rudironsoni