> ## 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.

# Edit & Rerun

> Re-execute a single UI test, a batch, or a scheduled run, and edit a test's steps before you re-run it.

![A UI test case open: Run test in the header, Preview and Code on the right](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-rerun-overview.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=22b019006179f4ff18e1e8c3940e7d28)

## What Rerun Does

Rerun re-executes a UI test against your live app from its saved script: same actions, same assertions, replayed from scratch. You can rerun one test, the whole project, or on a schedule; [Auto-Heal](https://docs.testsprite.com/web-portal/core/ui/auto-heal.md) recovers tests when the page changed but the flow is fine. When the test itself needs to change first, use [Edit Steps & Rerun](#edit-steps--rerun).

## Quick Start

**1. Open the test you want to rerun**

From your project's **Test Cases** list in the sidebar, click into the test.

![Test Cases in the sidebar, with a test row picked out of the list](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-rerun-open-test.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=c7eeea27877673a1fa7dc33fc5033c2c)

**2. Click Run test**

The button in the test's header reads <kbd>Run test</kbd>, or <kbd>Save & Run</kbd> when there are unsaved edits. Replay starts immediately.

![The Run Test button in a test detail page header](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-rerun-rerun-single.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=17e3881320dd84479bb2d9f0a403b79e)

**3. Watch live or come back later**

The test detail page updates in real time; you can leave and check the result later.

## Three Rerun Surfaces

### Single Test Rerun

<kbd>Run test</kbd> (or <kbd>Save & Run</kbd>) on a test's detail page, as in the Quick Start above.

### Rerun All (Batch)

<kbd>Run all</kbd> on the project's <kbd>Test Cases</kbd> toolbar queues every test in the project, useful after a refactor, dependency upgrade, or design pass.

![Run all on the Test Cases toolbar, queueing every test in the project](https://mintcdn.com/testspriteinc/CImpC64Ju-sB5348/images/ui-testing-rerun-open-rerun-selected.png?fit=max\&auto=format\&n=CImpC64Ju-sB5348\&q=85\&s=4532e3b72eaf60181f50fa88480767e2)

### Scheduled Reruns

Schedules re-run your tests on a cadence (Hourly, Daily, Weekly, Monthly). See [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)

## Edit Steps & Rerun

When a test fails because the *test* is wrong (a step references a button that moved, or the flow gained a confirmation screen), fix the steps instead of rerunning the same script. Steps on a run's page are read-only history; edit on the test case, which the run page links to.

![Edit steps & re-run dialog](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-step-edit-in-editor.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=27ae77bb2253497f4aa74834a03b5a5d)

**1. Open the editor**

On a test case's detail page, click <kbd>Edit Steps</kbd> beside the **Runtime steps** section, or hover a step and click its pencil icon (*Edit steps & re-run from here*) to start editing **from that step**.

![The Edit Steps button beside the Runtime steps section](https://mintcdn.com/testspriteinc/_BbYEfcR7H2VaTOC/images/ui-testing-step-open-editor.png?fit=max\&auto=format\&n=_BbYEfcR7H2VaTOC\&q=85\&s=abf1bf112d9ba30fd51378e657475876)

**2. Rewrite from the pivot**

If you started from a specific step, everything before it is **locked**. From that step on, change a step's text, toggle it between <kbd>Action</kbd> and <kbd>Assert</kbd>, insert steps with <kbd>Add step</kbd>, or delete steps.

**3. Keep the pass criterion in sync**

The run is **judged against** the <kbd>What counts as a pass</kbd> field at the top, not the steps. If your edits change what the test proves, update it too, or the run can do exactly what you asked and still fail.

**4. Save & Re-Run**

Click <kbd>Save & Re-Run</kbd>. The edited steps become the test's new definition (a new version appears in the version history), and the whole test runs immediately.

> [!NOTE]
>
> **Locked ≠ skipped.** Every run starts from a fresh browser session, so locked steps still run exactly as written; they're only protected from editing.

### Edit-and-Rerun vs. Plain Rerun

| | Plain Rerun | Edit Steps & Rerun |
| - | - | - |
| Test definition | Unchanged: replays the saved steps | Replaced: your edits become the new definition |
| Version history | No new version | A new version is created |
| When to use | Checking whether a failure reproduces, or whether the app was fixed | The failure is in the test itself: steps are stale or incomplete |

Edit Steps & Rerun is available for standalone UI test cases. It's not available for API tests, integration chains, read-only views (viewer role, historical versions), or while a run is in flight.

## Edge Cases & Troubleshooting

> [accordion] Rerun started but the page didn't update
>
> If you don't see progress within a few seconds, refresh. The rerun is still happening; this is just a live-update hiccup.

> [accordion] I want to keep my unsaved edits but rerun the saved version
>
> <kbd>Save & Run</kbd> always saves first. To rerun the saved version, discard your edits (`Cmd`/`Ctrl`+`Z` or revert the editor), then click <kbd>Run test</kbd>. The warning dot on a dirty editor tells you you'd be running a different script than what's saved.

> [accordion] Run all is greyed out
>
> Either the project has no tests yet (still in plan generation), or another project-level operation, such as an active run, is in flight. The button re-enables when the project is idle.

## Where to Go Next

> [card] [Step-by-Step Replay](https://docs.testsprite.com/web-portal/core/ui/ui-step-by-step.md)
>
> See exactly what happened on each step of a run

> [card] [Test Schedules](https://docs.testsprite.com/web-portal/maintenance/monitoring.md)
>
> Set up nightly schedules to catch drift early

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


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