---
title: Configuration
description: Choose the branches Test Engine tracks, set the CI time budgets for flaky test detection and turn on auto-quarantine.
---

Every Test Engine setting lives on one page of the dashboard:
**Test Engine >
[Configuration](https://dashboard.mergify.com/test-engine/configuration)**.
Pick a repository in the selector at the top right. The settings apply to that
repository only, except the ones under **Global**.

Changing a setting requires write access to the repository. Without it, the page
shows the current values but you cannot change them.

## Global

The settings in this section apply to every repository of the organization.

**Data Retention** shows how long Mergify keeps your test runs, which depends on
your plan. Mergify judges test health from the runs it keeps, so a longer
history makes the [health status](/test-engine/health) more accurate and
catches flaky tests that fail only once in a while.

{/* heading-case: allow — the dashboard section name */}
## Tracked Branches

Test Engine judges test health from the runs on the branches a repository
tracks. A repository tracks its default branch until you change the list. Each
tracked branch gets its own [health status](/test-engine/health) for every
test, so a test can be flaky on `staging` and healthy on `main`.

On the Max and Enterprise plans, you can track up to 5 branches: type each
branch's exact name in **Branches** and click **Save** in the bar at the bottom
of the page. On other plans, a repository tracks its default branch only.

A branch you add shows data once its CI runs report results. The branch
selector on the [Detection](/test-engine/detection) page and on a test's details
switches between the tracked branches.

{/* heading-case: allow — the dashboard section name */}
## Native Flaky Detection

Mergify's test framework plugins rerun your tests to find flaky ones, within
the CI time budgets you set in this section. Without a plugin, these settings
have no effect: see the
[test framework configuration](/test-engine/test-frameworks) to
install one.

- **Prevention Budget**: CI time Mergify can spend rerunning the tests a pull
  request adds, to catch flaky tests before they merge.
  [Prevention](/test-engine/prevention) reruns tests within this budget.

- **Detection Budget**: CI time Mergify can spend rerunning tests that failed
  recently or do not have enough runs yet, to tell whether they are flaky.
  Detection [reruns unhealthy tests](/test-engine/detection#rerunning-unhealthy-tests)
  within this budget.

Each budget is a percentage of a typical test run. At 10%, Mergify may add up to
a tenth of that run's duration to each run. The line under the slider shows how
much time that is for your repository.

A repository starts with no budget saved, so Mergify spends no extra CI time
until you set one. Move the sliders, then click **Save** in the bar at the bottom
of the page. The bar saves every section you changed, and **Discard** drops
those changes.

The badge next to each budget reads **Active** once a plugin has recently used
that budget, and **Not Used Yet** otherwise.

## Auto-quarantine

Auto-quarantine lets Mergify quarantine tests without anyone doing it by hand.
See [Test States](/test-engine/test-states) for what quarantine does to a
test, and
[when Mergify quarantines a test itself](/test-engine/test-states#when-mergify-quarantines-a-test-itself)
for the evidence it waits for.

- **Quarantine Flaky Tests Automatically**: the main switch. Once it is on,
  Mergify quarantines a flaky test as soon as it has enough evidence.

- **Also Quarantine Broken Tests**: quarantines tests that fail every time as
  well. They stop blocking pull requests, but they also stop catching real bugs
  until someone fixes them.

- **Unquarantine Recovered Tests Automatically**: once a test that Mergify
  quarantined is
  [healthy again](/test-engine/test-states#leaving-quarantine-automatically),
  Mergify takes it out of quarantine. When it is off, the test stays
  quarantined until someone unquarantines it.

The two options can only be changed while the main switch is on. The main
switch asks you to confirm before it turns auto-quarantine on or off; the two
options take effect as soon as you flip them, with no save step.
**View change history** opens the activity log for auto-quarantine changes.

Auto-quarantine is available on plans that include quarantine. On other plans,
the section shows its switches turned off and grayed out.

{/* heading-case: allow, the dashboard section name */}
## Test Retry

On plans that include quarantine, retrying failing tests on the default branch
and in the merge queue is on by default. The Test Retry section turns it off or
back on, and sets the retry budget and the retries per test. See
[Test Retry](/test-engine/test-retry) for what it does and its defaults.
