본문으로 건너뛰기
Skillpedia
테스트5.8k · #14635

run-tests

하는 일

이 스킬은 프로젝트의 테스트 플랫폼과 프레임워크에 맞는 올바른 .NET 테스트 명령을 고르고 실행합니다. 추측 없이 테스트 하나, 테스트 묶음, 또는 진단 실행을 하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓.NET 프로젝트에서 테스트 하나, 클래스 하나, 카테고리 하나, 또는 복합 필터로 실행해야 할 때.
  • ✓no-build나 TRX 출력 같은 옵션을 포함한 정확한 dotnet test 명령이 필요할 때.
  • ✓테스트 명령이 인식되지 않는 옵션이나 필터 오류를 낼 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/run-tests/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/run-tests/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 MSTest 프로젝트에서 로그인 테스트만 실행하는 정확한 dotnet test 명령을 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 프로젝트가 쓰는 실행기와 프레임워크를 확인하고, 맞는 명령 문법을 고른 뒤, 명령을 실행하거나 실행할 수 있게 돌려줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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:

Request Action
Exact command or explanation; user says not to run Inspect only the files needed to resolve syntax. Do not restore, build, or run tests.
Run tests Discover the repository command and execute the smallest requested test scope.
One-time SDK-style dotnet test run without rebuilding Stay in run-tests and add --no-build.
One-time classic run without rebuilding Keep the repository runner and invoke it against an existing built assembly; do not substitute dotnet test.
Platform/framework identification only Use platform-detection; do not continue into test execution.
Explicit hot reload or a keep-running edit/re-run loop Use mtp-hot-reload.
Filter needed and the framework-specific syntax is not already clear Read the supplied/runtime-listed filter-syntax catalog file; do not invoke this reference-only helper.

Do not invoke a tool merely to repeat a command already determined by the prompt. Do not build first "just in case": dotnet test builds by default. Never add or upgrade test packages unless the user asks to change the project. For an exact-command request, return one runnable command first. Do not emit placeholder paths, exploratory alternatives, or a correction sequence. Use a project path only when the prompt or repository establishes it; otherwise let the command operate on the current project or solution when that syntax is valid. Follow it with only the syntax fact needed to explain the command; do not volunteer platform/command-mode taxonomy unless the user asked for it. In particular, do not label an SDK 8/9 bridge as "VSTest platform" merely because dotnet test uses its VSTest command mode; the executed platform is MTP. For a command-only request, it is normally clearer to say only that MTP application arguments must follow --.

Inputs to discover

  • Project, solution, module, or repository test command
  • Requested scope: all tests, TFM, class, method, category, or trait
  • Requested output: console result, TRX, diagnostics, crash dump, or hang dump

When those facts are present in the prompt, use them. Otherwise inspect only the relevant files: global.json, the selected project, packages.config, Directory.Build.props, Directory.Packages.props, then repository scripts/CI documentation. For a file-backed request, enumerate those configuration names once and read all relevant files that are present in one batch; never infer that a runner or bridge property is absent merely because it is not in the .csproj. Load platform-detection only when those signals need precedence analysis; do not duplicate its full analysis in the response. If execution is requested and the command depends on the active SDK but neither the prompt nor global.json establishes it, run dotnet --version once. For a command-only request that prohibits execution, do not probe: state the required SDK assumption or ask for the SDK version when the syntax cannot otherwise be resolved. Route

자주 묻는 질문

실패한 테스트를 고치나요?

아니요. 명령을 실행하거나 돌려주기만 하며, 실패 진단은 다른 스킬이 다룹니다.

코드 커버리지를 수집할 수 있나요?

네. 커버리지 수집, 진단 로그, 충돌이나 멈춤 덤프를 다룹니다.

정확한 명령이 왜 중요한가요?

올바른 문법은 테스트 플랫폼에 따라 다르므로, VSTest에서 되는 명령이 Microsoft.Testing.Platform에서는 실패할 수 있습니다.

상세 정보

작성자의 원본 설명

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

repo: dotnet/skills

인기도

GitHub 스타
5.8k
순위
#14635
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬