test-flakiness
하는 일
이 스킬은 여러 번의 실행에 걸친 자동 테스트 결과를 살펴 무작위로 실패하는 테스트를 찾습니다. 신뢰할 수 없는 빨간 빌드에 지친 개발자와 QA 리드를 위한 스킬입니다.
사용하는 경우
- ✓팀에 테스트 실행이 많고 일부 테스트가 무작위로 실패하는 것 같을 때.
- ✓개발자가 CI 실패를 아마 불안정한 것일 거라며 무시하기 시작할 때.
- ✓격리된 테스트의 가능한 원인 진단이 필요할 때.
스킬 링크
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-flakiness/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“CI 로그를 살펴서 불안정한 테스트를 찾고, 격리해야 할 것을 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 CI 로그 파일을 읽고 여러 실행에 걸친 통과율을 계산하며, 간헐적 실패를 찾습니다. 각 불안정한 테스트를 격리할지 고칠지 권장하며, 보고서를 저장할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation
Automation mode: Resolve modes.automation (project.local.yaml →
project.yaml → default collaborative). Every AskUserQuestion call and
every file write follows .claude/docs/automation-modes.md
(collaborative asks always · guided major-only · autonomous logs and proceeds;
automation_always_ask categories always prompt).
Test Flakiness Detection
A flaky test is one that sometimes passes and sometimes fails without any code change. Flaky tests are worse than no tests in some ways — they train the team to ignore red CI runs, masking genuine failures. This skill identifies them, explains likely causes, and recommends whether to quarantine or fix each one.
Output: Updated tests/regression-suite.md quarantine section + optional
production/qa/flakiness-report-[date].md
When to run:
- Polish phase (tests have had many runs; statistical signal is reliable)
- When developers start dismissing CI failures as "probably flaky"
- After
/regression-suiteidentifies quarantined tests that need diagnosis
1. Parse Arguments
Modes:
/test-flakiness [ci-log-path]— analyse a specific CI run log file/test-flakiness scan— scan all available CI logs in.github/or standard log output directories/test-flakiness registry— read existing regression-suite.md quarantine section and provide remediation guidance for already-known flaky tests- No argument — auto-detect: run
scanif CI logs are accessible, elseregistry
2. Locate CI Log Data
Option A — GitHub Actions (preferred)
Check for test result artifacts:
ls -t .github/ 2>/dev/null
ls -t test-results/ 2>/dev/null
For Godot projects: GdUnit4 outputs XML results compatible with JUnit format,
under reports/ (its default report folder, res://reports/). Check reports/,
and any test-results/ you saved runs into, for .xml files.
For Unity projects: game-ci test runner outputs NUnit XML to test-results/
by default.
For Unreal projects: automation logs go to Saved/Logs/. Grep for
Result={Success} and Result={Fail} — each test prints
Test Completed. Result={<status>}
(docs/engine-reference/unreal/current-best-practices.md, "Command Line").
Option B — Local log files
If a path argument is provided, read that file directly.
Option C — No log data available
If no logs found:
"No CI log data found. To detect flaky tests, this skill needs test result history from multiple runs. Options:
- Run the test suite at least 3 times and collect the output logs
- Check CI pipeline output and save a log to
test-results/- Run
/test-flakiness registryto review tests already flagged as flaky intests/regression-suite.md"
Stop and ask the user which option to pursue.
3. Parse Test Results
For each CI log or result file found, parse:
JUnit XML format (GdUnit4):
- Grep for
<testcase name=to get test names - Grep for
<failureor<errorto identify failures - Parse
classnameandnameattributes for full test identifiers
NUnit XML format (Unity — the file whose <test-run> element /smoke-check
reads):
- Each test is a
<test-caseelement; itsfullnameattribute is the identifier - Its
resultattribute isPassed,Failed,InconclusiveorSkipped(docs/engine-reference/unity/current-best-practices.md, "Command Line"); onlyPassedandFailedenter the history
Plain text logs:
- Grep for pass/fail patterns:
- Godot:
PASSED/FAILEDadjacent to test names - Unreal:
Result={Success}/Result={Fail} - Unity:
Test passed/Test failed
- Godot:
Build a table: test_id → [run1_result, run2_result, run3_result, ...]
4. Identify Flaky Tests
A test is flaky if it appears in the result history with both PASS and FAIL outcomes across runs with no code changes between them.
Flakiness thresholds:
- High flakiness: Fails in >25% of runs — quarantine immediately
- Moderate flakiness: Fails in 5–25% of runs — investigate and fix soon
- Low/suspected flakiness: Fails in 1–5% of runs — monitor; may be genuinely rare failure
With fewer than 3 runs, every finding is suspected, whatever its fail rate. One failure in two runs reads as 50%, but it is one data point: do not quarantine it, label it suspected, and ask whether more run data is available. The tiers above, and quarantine, apply from
자주 묻는 질문
실행이 많이 필요한가요?
네. 한 번의 실행으로는 간헐적 실패를 보여 줄 수 없으므로, 여러 번 실행한 뒤에 가장 잘 작동합니다.
격리란 무엇인가요?
불안정한 테스트를 주요 결과에서 빼내어 실제 실패를 가리지 않도록 하는 것입니다.
로그는 어디서 찾나요?
지정한 로그 파일 하나를 분석하거나, 표준 CI 로그 폴더를 스캔할 수 있습니다.
상세 정보
작성자의 원본 설명
Find flaky tests from CI logs — aggregates pass rates, spots intermittent failures, recommends quarantine. After multiple runs.
인기도
- GitHub 스타
- 33k
- 순위
- #8502
- 라이선스
- MIT
- 업데이트
- 2026. 10. 18.
댓글
- …
이 저장소의 다른 스킬
adopt
33k기존 게임 프로젝트의 문서가 스튜디오 템플릿 형식을 따르는지 확인하고, 빠진 부분을 고치기 위한 번호 매긴 이전 계획을 씁니다.
architecture-decision
33k기술적 선택에 대한 아키텍처 결정 기록을 쓰고, 맥락, 대안, 결과를 담으며, 적절한 기술 역할의 검토를 거치도록 돕습니다.
architecture-review
33k기술 결정이 모든 설계 요구 사항을 다루고, 서로 충돌하지 않으며, 엔진 버전에 맞는지 점검해 통과 또는 우려 판정을 명확히 줍니다.
art-bible
33k게임의 시각적 정체성을 정의하는 아트 바이블을 써서, 자산 제작이 하나의 명확한 스타일 규칙을 따르게 합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.