Loading...
Loading...
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.
npx skill4agent add tuist/agent-skills analyze-selective-testingtuist test list --jsontuist test xcode target list <test-run-id> --jsontuist test list --json --page-size 10
tuist test list --git-branch feature-x --json --page-size 5tuist test show <test-run-id> --jsonxcode_versionmacos_versiontuist test xcode target list <test-run-id> --jsonmisslocalremotetuist 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 --jsoneffectiveness = (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 |
miss| Cause | How to verify |
|---|---|
| Xcode version change | Compare |
| CI environment change | Compare |
| 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 |
misstuist test xcode target list <good-run-id> --jsontuist test xcode target list <bad-run-id> --jsonlocalremotemissnamehit_statushashSelective Testing Analysis: test run abc123 on feature-x
Effectiveness: 15% (3/20 targets skipped) -- LOW
Local hits: 2 targets (CoreTests, UtilTests)
Remote hits: 1 target (NetworkTests)
Misses: 17 targets
Comparison with baseline (run def456, 75% effectiveness):
14 targets changed from hit to miss
All changed targets have different hashes
Root cause: Xcode version changed from 15.2 to 16.0 between runs.
This changed all target hashes, invalidating the entire cache.
Recommendations:
- Align CI Xcode version with the version used in the baseline run.
- If the upgrade is intentional, run tests once to re-warm the cache.tuist test xcode target list