analyze-selective-testing
Qué hace
Esta skill analiza las ejecuciones de pruebas de Xcode en Tuist para ver qué objetivos de prueba se omitieron o se ejecutaron. Está pensada para desarrolladores de iOS y macOS que quieren ejecuciones de prueba más rápidas sin perder pruebas.
Cuándo usarla
- ✓Cuando quieres saber qué objetivos de prueba omitió Xcode en una ejecución.
- ✓Cuando la selección de pruebas parece haber empeorado y quieres encontrar la causa.
- ✓Cuando quieres comparar dos ejecuciones de prueba para ver qué cambió.
Link de la skill
https://github.com/tuist/tuist/blob/main/skills/skills/analyze-selective-testing/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Comprueba qué objetivos de prueba se omitieron en mi última ejecución en esta rama y por qué bajó la omisión.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente enumera las ejecuciones de prueba recientes con la herramienta de línea de comandos de Tuist, lee el estado de prueba selectiva de cada objetivo y compara ejecuciones cuando sospecha una regresión.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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)
Preguntas frecuentes
¿Necesito Tuist?
Sí. La skill usa la herramienta de línea de comandos de Tuist para leer los datos de las ejecuciones de prueba.
¿Qué significa que un objetivo se omitió?
Significa que no se ejecutó porque no cambió, ya sea desde una caché local o remota.
¿Puede comparar dos ejecuciones?
Sí. Puede comparar una ejecución correcta conocida con una que haya empeorado.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 5,9 mil
- Posición en el ranking
- #14536
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
compare-builds
5,9 milAyuda a tu agente a comparar dos compilaciones de Xcode para encontrar las compilaciones más lentas, los cambios en el uso de la caché y los problemas nuevos.
compare-bundles
5,9 milAyuda a tu agente a comparar dos paquetes de app para encontrar cambios de tamaño, archivos añadidos o eliminados y diferencias entre plataformas.
compare-cache-runs
5,9 milAyuda a tu agente a comparar dos ejecuciones de caché para encontrar cambios en las tasas de aciertos y explicar por qué se invalidó la caché.
compare-generations
5,9 milAyuda a tu agente a comparar dos ejecuciones de generación de proyectos de Tuist para encontrar cambios en los aciertos de caché y la causa de la invalidación de la caché.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.