Test Impact Analysis Cheat Sheet

Map tests to changed files quickly

Last Updated: November 21, 2025

Focus Areas

Focus
Map file changes to impacted test suites
Run smoke tests before heavyweight suites

Commands & Queries

git diff origin/main...HEAD --name-only
List changed files
python scripts/impact.py --files ...
Compute impacted tests
pytest -k affected
Run targeted test set

Summary

Run the smallest set of tests that still gives confidence.

💡 Pro Tip: Leverage dependency graphs or tags to prioritize critical suites.
← Back to Developer Tools | Browse all categories | View all cheat sheets