본문으로 건너뛰기
Skillpedia
테스트5.9k · #14536

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/tuist/tuist/blob/main/skills/skills/analyze-selective-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분.

작동 방식

에이전트는 Tuist 명령줄 도구로 최근 테스트 실행을 나열하고, 각 타깃의 선택적 테스트 상태를 읽습니다. 회귀가 의심되면 실행들을 비교합니다.

기술 내용 (원본 SKILL.md)

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

Analyze Selective Testing

Quick Start

  1. Run tuist test list --json to find test runs.
  2. Run tuist test xcode target list <test-run-id> --json to see per-target selective testing status.
  3. 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), or remote (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:

  1. Run tuist test xcode target list <good-run-id> --json and tuist test xcode target list <bad-run-id> --json.
  2. Match targets by name — identify those that changed from local/remote to miss.
  3. Compare hashes for changed targets — if a target's hash differs, its sources or dependencies changed.
  4. 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:

  1. Overall: effectiveness percentage, verdict (healthy/moderate/low/cold)
  2. Target breakdown: targets grouped by hit status
  3. Comparison (if applicable): targets that changed status between runs, with hash diffs
  4. Root cause: what caused the regression
  5. 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.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬