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

test-gap-analysis

하는 일

이 스킬은 기존 테스트 중 어떤 것도 실패하지 않은 채 깨질 수 있는 운영 코드의 동작을 찾습니다. 테스트가 실제 버그를 잡을지 알고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓기능에 실제 버그가 있으면 기존 테스트가 잡을지 알고 싶을 때.
  • ✓한 컴포넌트나 위험 영역에서 테스트되지 않은 동작을 찾고 싶을 때.
  • ✓테스트를 추가하기 전에 의심되는 테스트 공백이 실제인지 확인해야 할 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/test-gap-analysis/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/test-gap-analysis/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에서 그대로 가져왔습니다.

Test Gap Analysis

Answer one question: which caller-visible production behaviors could change without an existing test failing? Mutation reasoning is a probe, not the goal. Inventory public outcomes first, then verify only credible gaps.

Composition dispatch

Before entering the decision flow, check the caller's mode. An explicit per-test-read-only request (including composition from grade-tests) uses only references/per-test-read-only.md. This mode is assessment context conveyed through the host's supported caller instructions, not a new skill-loader parameter or a mode-specific skill name. Read that reference and return its per-test assessment inline; do not enter the standalone workflow below. Loading this mode does not authorize a baseline run, mutation execution, file edits, suite discovery, or delegation. If the bundled reference is unavailable, allow at most one listing of the known references/ directory, then return N/A / unverified with the reason.

Requests without this mode retain the standalone analysis, verification, and test-addition paths below.

Decision flow

1. Set scope

Discover production and test files from manifests and file types. After a narrow search misses, inspect the current directory broadly before asking for paths.

Request Action
One component or named risk Inventory every high-risk public outcome in scope; do not edit production code unless verification was requested
General small-component review Inventory distinct outcomes and report caller-visible gaps from source/assertion mapping
Explicit survivor verification Inventory all requested outcomes; execute one representative observable candidate for each distinct high-risk outcome under verification, then classify it as Survived or Killed
Explicit exhaustive audit Read references/mutation-catalog.md and classify all meaningful candidates
Add tests to an existing suite Analyze first; add tests only for verified survivors or demonstrated no-coverage outcomes
Create a new suite Stop and use code-testing

When the request names a risk, turn it into a one-line public-outcome allowlist before reading code. An outcome is not in scope merely because the same method writes it. For money math, allow computed or returned amounts, rates, tier/boundary choice, percentage base/order, floors/caps, and rounding; exclude non-monetary state predicates (including derived booleans), identity, and formatting. Private code is in scope only to trace an allowed outcome.

Do not expand a focused request into a repository audit, plan artifact, or dashboard. Use source and tests directly for familiar frameworks. When discovery or assertion semantics are unclear, read the matching language file relative to the caller-provided or runtime-listed test-analysis-extensions catalog; do not invoke the reference-only helper or search installation directories. If absent, state the limitation and use the pinned APIs and rules here.

2. Establish one baseline

For a source-only advisory review, skip execution and label empirical survival unverified. A baseline is required when the user requests execution or survivor verification, or when closing gaps with tests. Run the narrowest existing test command once. Choose it from the project manifest; Microsoft.Testing.Platform executables may require dotnet run. Confirm tests executed: exit 0 with build-only output is not green. If that one attempt cannot run the suite, do not troubleshoot the runner or try alternate commands for an advisory review; continue statically and label all candidates unverified. Do not infer a project-configuration cause from missing output; name a cause only when the command reports it.

Missing runner output limits only claims of empirical mutation survival. It does not make source-proven facts tentative: a public outcome with no reaching test is still No coverage, and an exact expected value derived from the unmodified implementation is still actionable. State the baseline limitation once, then give the static source/assertion conclusion directly instead of hedging every row.

For an advisory review such as "would tests catch this?", stop execution after that baseline. Source-to-assertion mapping is sufficient evidence for No coverage and Candidate survivor (unverified). Trace or run the unmodified code once only

자주 묻는 질문

빠진 테스트도 직접 쓰나요?

공백을 메우라고 요청했을 때만 씁니다. 그렇지 않으면 보고만 합니다.

코드 커버리지와 같은 건가요?

아니요. 커버리지는 어떤 줄이 실행되었는지 보여 주지만, 이 스킬은 동작이 실제로 보호되는지 확인합니다.

솔루션 전체도 다루나요?

다룰 수 있지만, 컴포넌트나 위험 영역 하나로 범위를 좁히면 보통 더 집중된 결과가 나옵니다.

상세 정보

작성자의 원본 설명

Find caller-visible production changes existing tests would miss through pseudo-mutation analysis; verify candidates or close gaps only when requested. Includes read-only per-test composition for grading. Polyglot. USE FOR: would tests catch a bug, behavioral blind spots, surviving mutations. DO NOT USE FOR: concrete fix/feature revision proof (test-value-evidence); suite taxonomy (test-tagging); .NET coverage, Cobertura, plateaus or coverage-backed priorities (coverage-analysis); named CRAP (crap-score); new suites (code-testing); assertion/smell audits; mutation tools.

repo: dotnet/skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬