Skills

Selective Testing Analysis

Shows which Xcode test targets were skipped or ran and why test selection changed.

Install

npx skills add tuist/tuist --skill analyze-selective-testing -g -a claude-code -y
Repository
tuist/tuist5.9k
Category
Testing
Updated
3d ago
License
See repository
Context cost
Lightabout 1,320 tokens
Runs scripts
No, instructions only

What it does

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.

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
Read the whole SKILL.md on GitHub

More in Testing