Introduction

What Retest is, what it tests and how it reports what happened.

Retest is the open-source test engine by Rehearsal. It runs tests written in TypeScript against web apps, iOS simulator apps, macOS apps and Electron apps. The API reads like Playwright's, so a test looks familiar.

tests/tasks.retest.ts
import { expect, test } from '@rehearsal-labs/retest'test('saves a task', async ({ page }) => {  await page.goto('/')  await page.getByLabel('Title').fill('Release checklist')  await page.getByRole('button', { name: 'Save' }).click()  await expect(page.getByTestId('saved-task')).toHaveText('Release checklist')})

One test can use several apps at once. It can create a task on an iOS simulator, change it in Chrome and check it in a macOS app. The test ends with one result.

How it differs Link to How it differs

  • It reports what happened. A test passes only when Retest saw it pass. A check it could not judge stays undecided. An action whose input may have reached the page is reported as outcome unknown.
  • Real input. A click is a real press and release at the element's centre. Retest first checks that the element is visible, stable, enabled and not covered. If the click lands on another element, Retest stops it and names that element.
  • Checks look again, actions never repeat. A check reads the page until it passes or its time runs out. An action is sent once, and Retest never reruns a test.
  • Nothing hidden. Every run writes a folder with its events, its result, its logs and its screenshots. retest inspect reads that folder back without running anything.
  • No dependencies. The package has no runtime dependencies. It talks to each browser through a driver of its own, and it downloads a browser only when you ask.
  • Made for agents. When a coding agent runs it, Retest prints a short report that ends with the next command to run. Every event is a JSON line with a published schema.

What it runs Link to What it runs

PlatformHow Retest drives it
Chromium, Chrome and EdgeIts own client for the browser's DevTools pipe
FirefoxIts own client for WebDriver BiDi
WebKitIts own client for WebKit's inspector
Electron appsThe Chromium driver, over the app's debugging pipe
iOS simulator appsXCTest, through a pinned build of WebDriverAgent
macOS appsXCTest, through a pinned macOS runner

A media process written in Rust turns a run's frames into recordings. Browser support lists what each browser can do today.

Requirements Link to Requirements

  • Node.js 24.12 or later.
  • macOS or Linux. Windows does not work.
  • A browser to test in: Chrome, Edge or Chromium on the machine, or a pinned build from retest install.
  • For iOS simulator and macOS apps, a Mac with Xcode. Mobile apps has the details.

Retest is under the Apache-2.0 licence, and its code is on GitHub.

Next steps Link to Next steps

  • Follow the Quick start to install Retest and run a first test.
  • Read Why Retest for the choices behind it, and what is still missing.
  • Learn the parts of a test in Write a test.