Skip to content

Run tests

Playwright Runner runs the Playwright installed in your workspace, headless. Results arrive as a progress indicator, a pass or fail notification, an error marker on each failing line, and the full output in a tab.

Action How
Run the test under the cursor ctrl-. then Playwright: Run test at cursor, or click the ▶ Run test lens
Run a whole describe cursor on the test.describe line, same action, or ▶ Run describe
Run the whole file ctrl-. then Playwright: Run file
Repeat the last run ctrl-. anywhere in the workspace, Playwright: Re-run last
A Playwright spec file in Zed with a "Run test" code lens above every test and a "Run describe" lens above each describe block.
Lenses above each test and describe block after discovery. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))
The code action menu opened with ctrl-. on a test line inside the math describe block, listing Playwright: Run test at cursor, Run file, Re-run last, Show last run output, the Show trace viewer and Show browser toggles, the chromium and mobile project toggles and Select all projects.
The same actions from the code action menu, with the option and project toggles below them; on a describe line the first entry is Run describe at cursor. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))
  • A progress indicator while the run is in progress; starting another run cancels the first one.
  • A notification such as “1 passed, 0 failed, 0 skipped (0.4s)”; the time is Playwright’s own measurement.
  • An error marker on the failing line until you edit the file or run again. With two or more projects, each failing project gets its own marker and the message starts with the project in brackets, for example [mobile] adds numbers: ....
  • The complete output of the run, one ctrl-. away: see Step labels and run output.
Zed after a single test run: a notification reads "1 passed, 0 failed, 0 skipped" with the time Playwright measured.
A passing run ends with a notification. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))
tests/failing.spec.ts in Zed with a red error marker on the expect line, the failure message in the diagnostic popup, and an error notification.
A failing run leaves an error marker on the failing line until the file is edited or run again. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))
  • Runs use the file on disk. If the buffer has unsaved changes you get a warning and the saved version runs.
  • With several configuration files, the one nearest to the test file is used.
  • Playwright below v1.38 produces a single warning and disables running.
  • Runs pass the selected projects to Playwright and honour the trace viewer and show browser options.

Screenshots on this site show Zed 1.26.2 on Linux with Playwright Runner 0.8.0; the window chrome differs per platform.