run-tests

Detects .NET test platforms and frameworks to run filtered tests with dotnet test.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill run-tests-alahmadiq8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-tests
Source: https://github.com/AlahmadiQ8/sre-agent-demo/tree/main/.claude/skills/run-tests
Command: npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill run-tests-alahmadiq8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Running .NET tests correctly requires knowing whether a project uses VSTest or Microsoft.Testing.Platform (MTP) and which framework (MSTest, xUnit, NUnit, TUnit) is in play, since each combination has different command syntax and filter rules. This Skill automates that detection and produces the correct dotnet test invocation, eliminating trial-and-error with incompatible flags. ## Core Features & Use Cases - Platform and framework detection: Inspects global.json, .csproj, Directory.Build.props, and Directory.Packages.props to determine VSTest vs MTP and MSTest, xUnit, NUnit, or TUnit. - Correct command generation: Produces the right dotnet test syntax for the SDK version, including the -- separator on SDK 8/9 and direct MTP arguments on SDK 10+. - Framework-specific filtering: Applies VSTest --filter expressions, xUnit v3 --filter-class/--filter-trait flags, or TUnit --treenode-filter paths as appropriate. - Use Case: A developer on .NET 10 with an xUnit v3 project asks to run only integration tests; the Skill detects MTP and xUnit v3, then runs dotnet test --filter-trait "Category=Integration" instead of the incompatible VSTest syntax. ## Quick Start Run the tests in this project, filtering to only the integration test category.

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 dotnet test with the --filter flag and an expression like "Name~LoginTest" or "TestCategory=Integration" on VSTest, MSTest, or NUnit. For xUnit v3 on MTP use --filter-class or --filter-method, and for TUnit use --treenode-filter with path syntax.

How do I know if my project uses VSTest or Microsoft.Testing.Platform?

On .NET SDK 10+, check global.json for a test runner setting of Microsoft.Testing.Platform. On SDK 8 or 9, look for TestingPlatformDotnetTestSupport set to true in the csproj, Directory.Build.props, or Directory.Packages.props.

Does xUnit v3 support the VSTest --filter syntax?

No, xUnit v3 on Microsoft.Testing.Platform does not support VSTest filter expressions. It uses framework-specific flags like --filter-class, --filter-method, --filter-trait, and --filter-query with its own query filter language.

Why are my MTP arguments not recognized by dotnet test?

On .NET SDK 8 or 9, MTP arguments must be passed after a -- separator, such as dotnet test -- --report-trx. On .NET SDK 10+, MTP arguments are passed directly without the separator.

Why are my tests not being discovered by dotnet test?

A common cause is a missing Microsoft.NET.Test.Sdk package reference in a VSTest project, which prevents test discovery. Also verify the project actually targets a test framework like MSTest, xUnit, or NUnit with its adapter package.

When should I not use this test-running approach?

This Skill does not write or generate test code, migrate projects from VSTest to MTP, configure CI/CD pipelines, or debug failing test logic. Use dedicated migration, debugging, or test-authoring skills for those tasks.