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

test-anti-patterns

하는 일

이 스킬은 테스트를 불안정하거나 유지보수하기 어렵게 만드는 흔한 문제를 테스트 코드에서 검토합니다. 테스트를 신뢰할 수 있는지 알고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓테스트가 중요한 것은 확인하지 않은 채 통과하는 것처럼 보일 때.
  • ✓테스트가 불안정하거나, 실행 순서에 의존하거나, 예외를 삼킬 때.
  • ✓신뢰하기 전에 테스트 파일이나 스위트를 심각도 순으로 검토받고 싶을 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/test-anti-patterns/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-anti-patterns/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 Anti-Pattern Detection

Quick, pragmatic analysis of test code in any supported language for anti-patterns and quality issues that undermine test reliability, maintainability, and diagnostic value.

Language-specific guidance: Read the caller-provided or runtime-listed test-analysis-extensions catalog and its matching language file when needed. Do not invoke the reference-only helper. If its files are absent, use the built-in framework rules below.

When to Use

  • User asks to review test quality or find test smells
  • User wants to know why tests are flaky or unreliable
  • User asks "are my tests good?" or "what's wrong with my tests?"
  • User requests a test audit or test code review
  • User wants diagnostic findings before deciding what to improve

When Not to Use

  • User wants to write new tests from scratch (use code-testing)
  • User wants direct implementation fixes rather than a diagnostic review (use the relevant write/edit skill)
  • User asks to fix swapped Assert.AreEqual argument order in MSTest (use writing-mstest-tests)
  • User asks to convert MSTest DynamicData from IEnumerable<object[]> to ValueTuple (use writing-mstest-tests)
  • User wants to run or execute tests (use run-tests for .NET)
  • User wants to migrate between test frameworks or versions (use migration skills)
  • User wants raw .NET coverage collection (use run-tests), non-.NET coverage collection or analysis (use native tooling), project-wide .NET coverage/CRAP metrics (use coverage-analysis), or named-target .NET CRAP (use crap-score)
  • User asks whether tests would catch a bug or wants behavioral/pseudo-mutation gaps (use test-gap-analysis)
  • User wants test-mix or happy-vs-error-path classification, standardized tagging, or trait/category distributions (use test-tagging)
  • User wants a deep formal test smell audit with academic taxonomy and extended catalog (use test-smell-detection)

Inputs

Input Required Description
Test scope No Test files, classes, directory, or project to analyze. Discover from the current workspace when omitted.
Production code No The code under test, for context on what tests should verify
Specific concern No A focused area like "flakiness" or "naming" to narrow the review

Workflow

Step 1: Detect language and load extension

Resolve the named test path from the current workspace before asking for input. When no path is supplied, discover test files under the current directory using the repository manifests and conventional test markers. The skill context's Base directory is documentation storage, not the user's workspace; never resolve target files relative to it.

If one reader says a path is missing but a workspace glob/search finds it, normalize that exact path and retry. Use a shell text reader (sed/cat on Unix, Get-Content on PowerShell) only for a confirmed reader availability, transport, or path-normalization failure and only after verifying the canonical path remains inside the current workspace. Stop on content-exclusion, permission/policy, workspace-boundary, or unknown failures. Audit any discovered file that a permitted reader can access; never ask the user to paste it. If every permitted reader fails, report the exact blocker without bypassing security boundaries.

Identify the language and framework. Read the matching bundled reference when needed, resolving its filename relative to the supplied catalog. Check only that known reference directory, never installation directories. If unavailable, use the catalog below and report the reference limitation.

Step 2: Gather the test code

Inventory the resolved scope before reading bodies. For one file or class, read that scope directly. For a project or suite, discover test files once, batch independent reads where tools allow, and stop when every discovered test and class-level fixture has a ledger disposition.

Use extension discovery markers when loaded; otherwise use the built-in markers in this skill (attributes such as [TestClass]/[Fact]/[Test], test_*.py, *.test.*, *_test.go, *_spec.rb, #[test], *.Tests.ps1, TEST(...), and TEST_CASE(...)).

Do not read unrelated production code wholesale. Open the production symbol corresponding to every suspicious test needed to decide whether an assertion, transformation, identity contract, or adjacent gap is real. For a systematic facade/surface-area patter

자주 묻는 질문

테스트를 고치나요?

아니요. 진단 검토이며, 직접 수정은 다른 스킬이 다룹니다.

어떤 언어를 다루나요?

많은 언어와 프레임워크를 다루며, 가능하면 각각에 대한 참고 지침도 함께 사용합니다.

테스트를 실행하나요?

아니요. 테스트 코드를 검토하며 실행하지 않습니다.

상세 정보

작성자의 원본 설명

Audit a test file or suite; produce a severity-ranked diagnostic report. ALWAYS USE for tests that verify nothing, missing/tautological assertions, swallowed/broad exceptions, flaky/order-dependent tests, duplication, or magic values. Polyglot. DO NOT USE for direct edits: writing-mstest-tests owns supplied MSTest assertions/attributes/lifecycle; code-testing owns new tests. Exclude running tests, migration, assertion metrics (assertion-quality), raw .NET coverage collection (run-tests), non-.NET coverage collection/analysis (native tooling), project-wide .NET coverage/CRAP (coverage-analysis)

repo: dotnet/skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬