analyze-selective-testing
하는 일
이 스킬은 Tuist에서 Xcode 테스트 실행을 분석해, 어떤 테스트 타깃이 건너뛰어지고 실행되었는지 확인합니다. 누락 없이 테스트 실행을 빠르게 하고 싶은 iOS와 macOS 개발자를 위한 것입니다.
사용하는 경우
- ✓테스트 실행에서 Xcode가 어떤 테스트 타깃을 건너뛰었는지 알고 싶을 때.
- ✓테스트 선택이 나빠진 것 같아서 원인을 찾고 싶을 때.
- ✓두 테스트 실행을 비교해서 무엇이 바뀌었는지 보고 싶을 때.
스킬 링크
https://github.com/tuist/tuist/blob/main/skills/skills/analyze-selective-testing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 브랜치의 최근 테스트 실행에서 어떤 테스트 타깃이 건너뛰어졌는지, 그리고 건너뛰기가 줄어든 이유를 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 Tuist 명령줄 도구로 최근 테스트 실행을 나열하고, 각 타깃의 선택적 테스트 상태를 읽습니다. 회귀가 의심되면 실행들을 비교합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Analyze Selective Testing
Quick Start
- Run
tuist test list --jsonto find test runs. - Run
tuist test xcode target list <test-run-id> --jsonto see per-target selective testing status. - If effectiveness dropped, compare targets between a known-good run and the regressed run.
Step 1: Resolve Test Runs
Find the test run to analyze
List recent test runs, optionally filtering by branch:
tuist test list --json --page-size 10
tuist test list --git-branch feature-x --json --page-size 5
Get basic info for a specific test run:
tuist test show <test-run-id> --json
Use this to confirm the run's branch, status, scheme, and environment (xcode_version, macos_version).
Defaults
- If no test run is specified, use the most recent CI test run on the current branch.
- For comparison, use the most recent CI test run on the project's default branch.
Step 2: Drill Into Selective Testing Targets
List per-target selective testing data for a test run:
tuist test xcode target list <test-run-id> --json
Each target includes:
- name: The test target name
- hit_status:
miss(ran),local(skipped via local cache), orremote(skipped via remote cache) - hash: The selective testing hash for this target
Filter by status to focus your analysis:
tuist test xcode target list <test-run-id> --hit-status miss --json
tuist test xcode target list <test-run-id> --hit-status local --json
tuist test xcode target list <test-run-id> --hit-status remote --json
Assess effectiveness
Count the targets by status:
effectiveness = (local_hits + remote_hits) / total_targets * 100
| Effectiveness | Verdict |
|---|---|
| 60-100% | Healthy — most unchanged tests are being skipped |
| 30-60% | Moderate — some cache invalidation occurring, worth investigating |
| 0-30% | Low — likely a core dependency changed or the cache was invalidated |
| 0% | Cold cache — first run, environment change, or full invalidation |
Step 3: Diagnose Regressions
If effectiveness dropped, investigate:
Check for global invalidation
If nearly all targets show as miss, the entire selective testing cache was invalidated. Common causes:
| Cause | How to verify |
|---|---|
| Xcode version change | Compare xcode_version between good and bad runs via tuist test show |
| CI environment change | Compare macos_version, model_identifier between runs |
| Project graph or dependency change | Check git history for changes to project manifests, dependency versions, or target configurations |
| Core dependency change | A widely-depended-on target changed, invalidating all its dependents |
Note: Tuist CLI version upgrades rarely cause hash invalidation — the hash version is not updated on every release.
Check for cascade invalidation
If only some targets show as miss, a dependency change likely cascaded:
- Run
tuist test xcode target list <good-run-id> --jsonandtuist test xcode target list <bad-run-id> --json. - Match targets by name — identify those that changed from
local/remotetomiss. - Compare hashes for changed targets — if a target's hash differs, its sources or dependencies changed.
- Look for a common dependency among the invalidated targets.
Compare two test runs
For each target:
- Match by
name - Compare
hit_status(hit -> miss = invalidated, miss -> hit = improved) - Compare
hash(different hash = target or its dependencies changed)
Step 4: Recommendations
Based on the diagnosis:
- Environment change: Ensure CI uses consistent Xcode/macOS versions. This is the most common cause of full cache invalidation.
- Cascade from dependency change: Consider if the change to the root target was necessary. If the root target is a widely-shared module, consider splitting it.
- Cold cache on new branch: Run tests once to warm the cache. Subsequent runs will benefit from selective testing.
Summary Format
Produce a summary with:
- Overall: effectiveness percentage, verdict (healthy/moderate/low/cold)
- Target breakdown: targets grouped by hit status
- Comparison (if applicable): targets that changed status between runs, with hash diffs
- Root cause: what caused the regression
- Recommendations: actionable next steps
Example:
Selective Testing Analysis: test run abc123 on feature-x
Effectiveness: 15% (3/20 targets skipped) -- LOW
Local hits: 2 targets (CoreTests, UtilTests)
자주 묻는 질문
Tuist가 필요한가요?
네. 이 스킬은 Tuist 명령줄 도구로 테스트 실행 데이터를 읽습니다.
건너뛰어진 타깃은 무엇을 뜻하나요?
변경되지 않았기 때문에, 로컬 또는 원격 캐시에서 실행되지 않았다는 뜻입니다.
두 실행을 비교할 수 있나요?
네. 정상이었던 실행과 회귀가 생긴 실행을 비교할 수 있습니다.
상세 정보
작성자의 원본 설명
Analyzes Xcode selective testing effectiveness for a test run, showing which test targets were skipped or ran, and diagnosing regressions in test selection. Can compare two test runs to identify what changed.
repo: tuist/tuist
인기도
- GitHub 스타
- 5.9k
- 순위
- #14536
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
compare-builds
5.9k에이전트가 두 Xcode 빌드 실행을 비교해 느려진 빌드, 캐시 사용의 변화, 새 문제를 찾도록 돕습니다.
compare-bundles
5.9k에이전트가 두 앱 번들을 비교해 크기 변화, 추가되거나 제거된 파일, 플랫폼 차이를 찾도록 돕습니다.
compare-cache-runs
5.9k에이전트가 두 캐시 실행을 비교해 캐시 적중률의 변화를 찾고, 캐시가 무효화된 이유를 설명하도록 돕습니다.
compare-generations
5.9k에이전트가 Tuist 프로젝트 생성 실행 두 개를 비교해 캐시 적중 변화와 캐시 무효화의 원인을 찾도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.