run-tests

Detects .NET test platform and framework to run dotnet test with correct flags and filters.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill run-tests-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-tests
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/run-tests
Command: npx skills add https://github.com/adinj00/player-performance --skill run-tests-adinj00

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The correct dotnet test syntax depends on the test platform (VSTest vs Microsoft.Testing.Platform), the SDK version, and the test framework, and getting it wrong produces unrecognized-flag errors or silently skipped tests. This Skill detects the environment and produces the exact command, flags, and filter syntax for the project. ## Core Features & Use Cases - Platform and framework detection: Inspects global.json, .csproj, Directory.Build.props, and Directory.Packages.props to identify VSTest vs MTP and MSTest, xUnit, NUnit, or TUnit. - Correct command generation: Handles the -- separator requirement on SDK 8/9 versus direct MTP arguments on SDK 10+, plus TRX reporting, crash/hang dumps, and code coverage flags per platform. - Filtered test runs: Translates requests like "run the integration tests" into the right filter (--filter, --filter-trait, --filter-query, --treenode-filter) for the detected framework. - Use Case: A user asks to run only smoke tests in a multi-TFM xUnit v3 project on .NET 9; the Skill detects MTP via TestingPlatformDotnetTestSupport and emits dotnet test --framework net9.0 -- --filter-trait "Category=Smoke". ## Quick Start Ask the assistant to run the integration tests in your .NET project and it will detect the platform and emit the correct dotnet test command.

Frequently Asked Questions about run-tests

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

FAQPage Schema
How do I run only specific tests with dotnet test?

Use the --filter flag with an expression like "TestCategory=Integration" for VSTest, MSTest, and NUnit. For xUnit v3 on Microsoft.Testing.Platform use --filter-class, --filter-method, or --filter-trait instead, and TUnit uses --treenode-filter.

What is the difference between VSTest and Microsoft.Testing.Platform for dotnet test?

VSTest uses flags like --logger trx and --blame, while Microsoft.Testing.Platform (MTP) uses --report-trx, --blame-crash, and --coverage with extension packages. On SDK 8/9 MTP arguments go after a -- separator; on SDK 10+ they pass directly.

Does dotnet test need the -- separator for MTP arguments?

On .NET SDK 8 and 9, MTP arguments must follow a -- separator, for example dotnet test -- --report-trx. On .NET SDK 10 and later, MTP arguments are passed directly without the separator.

Why does dotnet test say --report-trx is unrecognized?

The --report-trx flag requires the Microsoft.Testing.Extensions.TrxReport package in an MTP project. If the project uses VSTest, use --logger trx instead, since each platform has its own TRX reporting flag.

How do I run tests for a single target framework in a multi-TFM project?

Pass --framework with the target framework moniker, such as dotnet test --framework net8.0. This flag is consumed by dotnet test itself and always goes before the -- separator on SDK 8/9.

When should I not use this test-running approach?

Do not use it for writing test code, migrating from VSTest to MTP, hot-reload iteration on failing tests, CI/CD pipeline configuration, or debugging test logic; those tasks belong to dedicated skills.