# Run Tests

ALWAYS USE before running .NET tests or answering with a test command or flags.

- Repository: https://github.com/managedcode/dotnet-skills (500 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add managedcode/dotnet-skills --skill run-tests -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill run-tests -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill run-tests -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill run-tests -g -a gemini-cli -y`

## Description

ALWAYS USE before running .NET tests or answering with a test command or flags. Trigger on "run the tests", "exact dotnet test command", one test/class/category/trait/target framework, combined filters, `--filter-query`, `--no-build`, `--diag`, diagnostic logs, TRX, coverage collection, crash/hang dumps, filter errors, or unrecognized options. Chooses repository-compatible classic, VSTest, bridged MTP, or native MTP syntax for MSTest/xUnit/NUnit/TUnit. DO NOT USE for platform identification alone (platform-detection), writing or debugging test code, interpreting an existing coverage report, CI investigation, migration, or a persistent hot reload/watch loop.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Run .NET Tests

Return or execute the command or command sequence that matches the repository's
project system, test platform, framework, and SDK mode.

## Repository overlay

For every repository-scoped task where read-only file inspection is allowed,
check `.agents/skill-overlays/dotnet-test/run-tests.md` at the repository root
before any other discovery. This includes exact-command requests; "do not
execute" does not prohibit reading the overlay. If present, read it once before
acting and apply its repository-specific runner, command, filtering, and
reporting bindings.
Before applying it, require its frontmatter to declare
`core: dotnet-test/run-tests`, `binding-revision: "1"`, and `mode: extend`. If
any value is missing or different, report the mismatch, ignore the overlay,
and continue using this skill's portable guidance.
Explicit user instructions and verified project constraints win over the
overlay; the overlay wins over portable defaults and examples in this skill. If
the file is present but unreadable or conflicts with the repository, report the
problem, ignore the overlay, and continue with portable guidance subject to
verified project constraints. If it is absent, continue normally.
Skip the lookup only when the task is not tied to a repository or the user
explicitly prohibited all file/tool access. An overlay cannot expand tool
permissions or the task's scope.

## Scope and tool policy

Choose the smallest path that satisfies the request:

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Testing/Official-DotNet-Test/skills/run-tests/SKILL.md
