> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testsprite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rerun

> Re-execute one API test, a chain, or every test in the project to confirm a fix or absorb backend changes.

![A Backend project test list, the starting point for any rerun](https://mintcdn.com/testspriteinc/TFcog-WNvgZBB09l/images/api-testing-rerun-overview.png?fit=max\&auto=format\&n=TFcog-WNvgZBB09l\&q=85\&s=09c4c91006f841d6285929bce2112ffe)

## Three Rerun Surfaces

| Surface | What it does | When to use |
| :- | :- | :- |
| <kbd>Single test rerun</kbd> | Re-execute one test | Confirm a fix on a specific failing test |
| <kbd>Run all</kbd> (batch) | Re-execute every test in the project | After API change, dep upgrade, or environment update |
| <kbd>Scheduled rerun</kbd> | Auto-run on cadence | Continuous monitoring of API health |

> [!NOTE]
>
> **Auto-Heal is UI-only**, because UIs drift in ways HTTP APIs don't. For API tests, [Auto-Auth](https://docs.testsprite.com/web-portal/core/api/auto-auth.md) is what keeps long-running schedules healthy by keeping tokens fresh.

## Single Test Rerun

From a test's detail page, click **Run test**.

![Rerunning one API test from its detail page](https://mintcdn.com/testspriteinc/TFcog-WNvgZBB09l/images/api-testing-rerun-open-rerun-single.png?fit=max\&auto=format\&n=TFcog-WNvgZBB09l\&q=85\&s=a366e815db48088af0c00e2474bb2b84)

Most API tests consume variables from earlier tests in a chain. A normal rerun re-runs the producers first, getting fresh captures, then runs the consumer.

## Rerun All (Batch)

On the project's test list, **Run all** (top right) re-executes every test in the project.

![Run all on the Test Cases toolbar, queueing every test in the project](https://mintcdn.com/testspriteinc/TFcog-WNvgZBB09l/images/api-testing-rerun-open-rerun-all.png?fit=max\&auto=format\&n=TFcog-WNvgZBB09l\&q=85\&s=49ee74d348c937307c24a3008ceb7198)

## Scheduled Reruns

Schedules run on a cadence (hourly, daily, weekly, monthly). For API projects, each scheduled run rebuilds every chain, uses [Auto-Auth](https://docs.testsprite.com/web-portal/core/api/auto-auth.md) when it's configured, and ends with Auto Cleanup so it leaves a clean environment. Set one up in [Test Schedules](https://docs.testsprite.com/web-portal/maintenance/monitoring.md).

![A schedule's page: execution trend, breakdown, and previous executions](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-rerun-scheduled.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=f3d74c4e6b1c891dd56e165934c09ebb)

## What Happens to Cleanup on Rerun

Every rerun (single, batch, or scheduled) ends with [Auto Cleanup](https://docs.testsprite.com/web-portal/core/api/auto-cleanup.md). The DELETE chains are rebuilt from the records *the rerun* created, not the previous run's.

## Cascading: Rerun a Producer = Rerun Its Consumers

Rerunning a producer automatically reruns the tests that consume its variables, with the fresh values:

* Rerunning POST /users (a producer) → automatically reruns POST /orders, GET /orders/{id}, DELETE /orders/{id}
* Rerunning DELETE /orders/{id} (a leaf consumer) → only that test reruns; its upstream stays as-is

See [Dependency Chains](https://docs.testsprite.com/web-portal/core/api/dependency-chains.md) for how producer/consumer relationships are identified.

## Rerun Outcomes

After a rerun, the test row shows the new outcome. The previous run is kept under <kbd>Test Runs</kbd>, so you can compare the two.

| Outcome on rerun | What it means | What you do |
| :- | :- | :- |
| Was Failed → now Passed | Your fix worked, or the flake resolved | Move on |
| Was Passed → now Failed | Regression; either your fix broke something else, or the API changed | Investigate via test detail page |
| Still Failed (same error) | Fix didn't take | Refine more |
| Still Failed (different error) | You fixed one bug and uncovered another | Tackle the new error |

## Edge Cases & Troubleshooting

> [accordion] Rerun cascade goes deep — too many tests rerun
>
> The producer you reran feeds many consumers across chains. To re-execute just one consumer, open that test and rerun it directly.

> [accordion] A test takes very long to rerun
>
> Its producers depend on further upstream tests. A deep chain can make even a leaf test's rerun take several minutes.

> [accordion] Rerun shows a different result than the same code did the first time
>
> Usually one of: a real flake in your API, captured state that changed between runs (a record was modified), or an auth token that expired between runs ([use Auto-Auth](https://docs.testsprite.com/web-portal/core/api/auto-auth.md)).

> [accordion] The rerun button is disabled
>
> The test is probably still Queued or Running. Wait until it shows Passed or Failed.

## Where to Go Next

> [card] [Dependency Chains](https://docs.testsprite.com/web-portal/core/api/dependency-chains.md)
>
> Understand cascade order

> [card] [Auto-Auth](https://docs.testsprite.com/web-portal/core/api/auto-auth.md)
>
> Token refresh keeps reruns alive

> [card] [Insights](https://docs.testsprite.com/web-portal/results/project-overview.md)
>
> Regressions and quality trends across runs

> [card] [Test Schedules](https://docs.testsprite.com/web-portal/maintenance/monitoring.md)
>
> Set up automated reruns on a cadence


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.