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

code-testing

하는 일

이 스킬은 새 테스트를 쓰고, 불안정하거나 깨진 테스트를 고치며, 기존 코드의 회귀 테스트를 추가합니다. 직접 설정하지 않고 테스트 커버리지를 높이려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓테스트가 없는 코드에 새 테스트가 필요하거나, 버그가 다시 생기지 않도록 테스트가 필요할 때.
  • ✓기존 테스트가 실패하거나 불안정하거나 더 강한 검증이 필요할 때.
  • ✓지원되는 테스트 프레임워크를 쓰는 프로젝트에서 커버리지 공백을 메우고 싶을 때.

스킬 링크

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

AI에게 요청하는 예시

“제 결제 서비스에 테스트를 추가해 주세요. 지난주에 고친 환불 버그를 막는 회귀 테스트도 포함해 주세요.”

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

작동 방식

에이전트가 코드와 기존 테스트를 읽고, 프레임워크에 맞는 스타일을 고르고, 테스트 케이스를 쓴 뒤 실행합니다. 범위가 넓은 작업은 먼저 단계별로 계획합니다.

기술 내용 (원본 SKILL.md)

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

Code Testing Skill

The reliable implicit entry point for generating, repairing, and strengthening tests. It handles focused work directly and invokes the public test-engineer agent for broad or multi-stage requests.

Non-negotiable execution contract

Check pipeline ownership first. If the active agent is test-engineer (including a plugin-qualified name such as dotnet-test:test-engineer), or the caller assigned you a phase of that pipeline, do not delegate to another generator. Continue the assigned work inline. This guard takes precedence over every broad-scope delegation instruction below, even if this skill was loaded automatically.

Classify scope before editing:

  • Broad (a project/package-wide suite, or multiple production files/modules): create research.md and plan.md in a resolved non-stageable <TESTAGENT_DIR> before implementation, then status.md there after the final test-quality review. When test-engineer is available, invoke that named custom agent before implementing; do not replace it with a generic subagent carrying the same label or implement the broad request inline. If the state files are absent, the broad workflow is incomplete.
  • Focused (the user explicitly limits work to one function/class/file or one missing method): do not create intermediate state files or fan out to multiple agents. A sparse project-wide request remains broad even when only one source module is present.

For either scope, run the narrowest relevant test command to a clean exit. Always apply Report-safe test names and result validation, including when the caller supplies conventions. Pass this contract to delegated implementers/testers; preserve edge-case data and validate configured reports, not just console output. Keep the handoff proportional: for one to three focused requirements, use a compact bullet list under a Requirement coverage label that names the tests and successful command; for broader or multi-requirement work, use a Requirement | Evidence table. Each requested behavior must cite an exact test name.

Before sending a broad-scope final response, check that the response itself contains | Requirement | Evidence | and exact test names for every behavioral row. A table in a child report or internal plan is not enough. Do not summarize away those names into module-level bullets or an Area | Tests table.

Intermediate state files are internal working data, never deliverables. Keep <TESTAGENT_DIR> non-stageable, never place it or its files in version-controlled workspace content, and never modify .gitignore to hide them.

Treat completeness as a requirement matrix, not a test-count target. Give every independently requested state, boundary, error path, or interaction its own concrete assertion. Combine cases only when one execution genuinely proves the whole requested combination; do not let a parameterized happy-path case stand in for an empty state, invalid discriminator, or before/at/after boundary. For broad requests that name several production modules or layers, give each named module direct tests for its non-trivial public behavior. Cross-module tests prove composition, but do not substitute for the requested module-level coverage. Judge breadth by the behavior matrix, never by matching or exceeding a raw test count.

At the public entry point, delegate broad work to test-engineer once. Research, plan, implementation, and review remain required, but they need not be separate sub-agent calls.

Use only capabilities available in the current runtime. Do not retry a missing skill under aliases or use another agent to retry a policy-denied operation. Read language guidance directly from the caller-provided or runtime-listed code-testing-extensions catalog and its matching language file. It is reference-only, not an invocable skill. If the bundle is absent, use manifests and representative tests and report the missing reference rather than searching installation dirs. If scratch storage is denied, keep the research and plan in context, continue permitted test edits, and report the missing state artifacts. If execution is denied, continue permitted static review and report tests as unrun, never passed. Neither blocker authorizes modifying production code or weakening requirements.

For a broad or comprehensive request, the explicit matrix is the floor, not the

자주 묻는 질문

테스트만 실행하나요?

아니요. 테스트를 쓰고 고칩니다. 테스트 실행만 하는 것은 별도의 스킬입니다.

큰 작업은 먼저 계획하나요?

네. 범위가 넓거나 여러 단계인 작업은 테스트를 쓰기 전에 계획하고 기록합니다.

어떤 프레임워크를 지원하나요?

xUnit, MSTest, NUnit, pytest, Jest, Vitest, Go 등 여러 프레임워크와 함께 동작합니다.

상세 정보

작성자의 원본 설명

ALWAYS USE for test work that requires changes: write, add, generate, repair, or strengthen tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework. Includes regression cases, failing or flaky tests, coverage-driven additions, and audit-then-fix requests. Focused work stays direct; broad or multi-stage work invokes test-engineer. DO NOT USE for only running tests, analysis-only audits, framework/platform migrations, a test blocked on a missing production seam (testability-obstacle), or MSTest API/configuration corrections that do not design new cases (wri

repo: dotnet/skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬