---
component: ROOT
version: "2026.3"
slug: ROOT/using-develocity/index
canonical_url: "https://docs.develocity.ai/2026.3/using-develocity/predictive-test-selection/"
title: "Predictive Test Selection"
description: "Develocity uses a machine learning model to run only the tests relevant to a code change, giving developers faster feedback in local and CI builds."
keywords:
  - "PTS"
  - "test acceleration"
  - "test performance"
  - "Build Scan"
status: current
---

<!-- llms-index: https://docs.develocity.ai/llms.txt -->

# Predictive Test Selection

<a id="preamble"></a>

Predictive Test Selection uses a machine learning model to identify which tests are relevant to a code change and runs only those tests. You trade full test coverage for faster feedback: local and pre-merge builds complete faster, while a subsequent pipeline stage can run the remaining tests.

> [!NOTE]
> Predictive Test Selection is an extension and may not be enabled for your installation. To enable it, contact Develocity support or your customer representative.

<a id="the-predictive-model"></a>

## The Predictive Model

Develocity trains a predictive model by observing code changes and test outcomes from your Build Scan data. It combines this per-project learning with training from millions of test executions across many projects. Until a project has enough change and test history for a prediction, Develocity selects all impacted tests.

Before each test run, the model cross-references a snapshot of the test suite and the code under test with change and outcome history. It then selects the tests most likely to provide useful feedback on the change.

![Diagram showing the predictive model mapping code changes to a selected subset of tests](https://docs.develocity.ai/2026.3/using-develocity/predictive-test-selection/../_images/how-predictive-test-selection-works.png)

How Predictive Test Selection Works

The model updates with each new Build Scan published to Develocity, so predictions improve as more build data accumulates. Develocity always selects tests that were recently added, changed, failed, or found flaky.

<a id="selection-profiles"></a>

## Selection Profiles

A selection profile controls how the model balances prediction confidence against time savings. Develocity provides three predefined profiles:

 
| Profile | Behavior |
| --- | --- |
| **Conservative** | Selects more tests to maximize the likelihood of catching every relevant failure. Time savings are lower than Standard. |
| **Standard** | The default. Balances confidence and time savings. |
| **Fast** | Selects fewer tests to maximize time savings. Confidence in catching all failures is lower than Standard. |

The Predictive Test Selection Simulator replays your historical build data to estimate what enabling PTS would have saved, and what it would have missed. It reports predicted failure detection rates, savings potential, and avoidable and unavoidable test counts, and lets you compare the three selection profiles.

<a id="when-to-use"></a>

## When to Use Predictive Test Selection

Enable Predictive Test Selection where feedback time matters more than running every test, such as local pre-commit checks and pre-merge CI jobs.

<a id="relevant-vs-remaining-tests"></a>

### Relevant Tests and Remaining Tests

Predictive Test Selection supports two selection modes:

*   **Relevant tests** mode selects the most relevant subset for the current changeset. Use this for pre-merge CI jobs and local pre-commit checks to get fast feedback.
    
*   **Remaining tests** mode selects the tests that were not run in a prior relevant-tests execution against the same changeset. Use this for post-merge or nightly builds to ensure complete coverage.
    

Pairing these two modes across pipeline stages means each test runs at most once per changeset.

![CI pipeline diagram showing relevant tests in the pre-merge stage and remaining tests in a post-merge stage](https://docs.develocity.ai/2026.3/using-develocity/predictive-test-selection/../_images/ci-pipeline.svg)

CI Pipeline with Relevant Tests and Remaining Tests

<a id="related-documentation"></a>

## Related Documentation

*   [Predictive Test Selection Guide](https://docs.develocity.ai/2026.3/guides/predictive-test-selection/): enabling and configuring PTS for Gradle and Maven, including the Simulator and troubleshooting
    
*   [Flaky Test Detection Guide](https://docs.develocity.ai/2026.3/guides/flaky-test-detection-guide/): enabling flaky test retry, which lets predictions account for non-deterministic test outcomes