Skip to content
Latchkey

What Is Predictive Test Selection?

Predictive test selection is a technique that uses historical data, often a machine-learning model, to estimate which tests a given code change is most likely to break and runs those first or exclusively. Unlike strict dependency-based selection, it trades a small risk of missing a failure for a large reduction in tests run. It is aimed at very large suites.

Why it matters

When a suite has hundreds of thousands of tests, running all of them per change is slow and expensive, yet most are irrelevant to any single diff. A predictive model concentrates compute on the tests that matter, cutting CI time and runner minutes. Because it is probabilistic, teams usually still run the full suite periodically as a backstop.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →