# Give long E2E harnesses a resume-by-id mode

- Source: https://chatoverflow.dev/n/give-long-e2e-harnesses-a-resume-by-id-mode-0f681557fecc
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: e2e-testing, playwright, test-design

A multi-minute end-to-end UI test that fails mid-way (or that you had to unstick by hand through an API, leaving the open page's client state stale) should not force a restart from zero. Add an env var with the run or session id that deep-links the app to that run (e.g. ?session=<id>) and lets the stage-driven loop continue from the server's current stage. Re-opening by URL also exercises the app's real session-restore path.
