ReferenceRunners
How a run is executed
What happens from running npx endform@latest test to receiving merged Playwright reports and dashboard results.
Endform runs your Playwright suite across isolated cloud machines while keeping your existing Playwright configuration, setup hooks, and reporters working as expected.
When you run npx endform@latest test, a run moves through three stages: local discovery and packaging, distributed cloud execution, and result collection.


1. Discovery, local setup, and packaging
The Endform CLI starts on the machine where you invoke it (your laptop or a CI runner) and prepares the run:
- Config evaluation and test discovery: The CLI loads your
playwright.config.ts, applies any CLI filters or flags, and lists the tests that will run. - Local
webServerandglobalSetup: If your Playwright config defines awebServerorglobalSetup, the CLI startswebServerand runsglobalSetuponce locally before remote execution begins. - Dependency analysis: The CLI analyzes your JavaScript and TypeScript test files to determine the exact files each test imports, along with shared dependencies across the suite,
storageStatefiles, selected environment variables, and any configuredadditionalFiles. - Network tunnel (when needed): Endform reaches
localhostand private networks over encrypted peer-to-peer tunnels through the CLI. If your config defines awebServer, or you configureproxyNetworkHostsorproxyNetworkPorts, the CLI opens that tunnel for the duration of the run. - Upload and registration: The CLI uploads the packaged files and registers the suite run with Endform's suite control.
2. Distributed execution
Once the run is registered, Endform schedules work across dedicated, ephemeral Firecracker MicroVMs isolated to your organization. Each machine receives only the test files, dependencies, and environment required for the work assigned to it.
Parallelism (fullyParallel)
Playwright's fullyParallel option controls how Endform splits a suite across machines (configured globally or per project in playwright.config.ts):
fullyParallel: true: Endform runs each test case on its own isolated machine.fullyParallel: false(Playwright's default): Endform runs each test file on its own isolated machine, executing the tests inside that file sequentially on that machine.
See Fully parallel testing for guidance on choosing between file-level and test-level parallelism.
Ordering, dependencies, and teardown projects
- Slowest tests start first: Based on historical durations, Endform schedules your longest-running tests first so a slow test does not start at the end of a run and hold up completion. Passing
--shufflekeeps your seeded shuffle order instead. - Project
dependencies: Setup projects run on remote machines before any dependent project starts. Files created or updated by a setup project (such asstorageStatefiles) are forwarded to dependent runners automatically. - Project
teardown: Teardown projects wait until all non-teardown work in the run has finished.
Concurrency limits and locks
Endform enforces any concurrentTestLimits configured in endform.config.ts, scoped either to the current suite run (within-suite-run) or across every running suite in your organization (across-all-runs).
Tests that share a Playwright lock (lock:<name>) run one at a time within a suite run by default, while independent tests continue in parallel. See Optimize test load for tuning limits against staging servers or rate-limited APIs.
Retries and quarantine
Each remote machine runs a single attempt of a test (or file batch).
- Parallel retries: When a test fails and has retries remaining, Endform can immediately schedule multiple retries in parallel on separate machines. As soon as one retry passes, Endform cancels the remaining in-flight retries for that test.
- Serial retry cases: Tests that hold a Playwright lock retry one attempt at a time, waiting for the lock to be released between attempts. Suites configured with Playwright's
retryStrategy: "isolated"finish initial attempts first and then run retries one at a time. - Quarantined tests: Tests matched by an active quarantine rule run once without retries, and their failures do not fail the suite.
3. Result collection and teardown
As each attempt completes, its remote machine uploads artifacts and streams live progress back to the CLI and the Endform dashboard:
- Blob reports and local reporters: Every runner produces a Playwright
blob-reportand sends it back to the CLI. Once all remote attempts finish, the CLI runs Playwright'smerge-reportscommand locally, so your configured Playwright reporters (HTML, JUnit, GitHub, or custom reporters) run with the combined results. - Replays, traces, and dashboard data: Endform records a visual replay for every attempt automatically alongside run outcomes, timings, errors, and any configured Playwright or OpenTelemetry traces. These stay available in the dashboard, CLI, and MCP server.
- Local cleanup: After remote execution finishes, the CLI closes any active proxy tunnel, runs
globalTeardown(if configured), stops anywebServerit started, and syncs back updated snapshot files when running with--update-snapshots.
What runs where
| Step | Runs on | Notes |
|---|---|---|
playwright.config.ts evaluation and test discovery | CLI machine | Resolves projects, filters, environment variables, and file dependencies |
webServer, globalSetup, and globalTeardown | CLI machine | Runs once per suite run; webServer traffic is proxied to remote runners automatically |
Setup and teardown projects (dependencies / teardown) | Remote MicroVMs | Runs on cloud runners; generated files such as storageState carry forward to dependent projects |
| Test attempts and retries | Remote MicroVMs | One isolated machine per test (fullyParallel: true) or per file (fullyParallel: false) |
merge-reports and Playwright reporters | CLI machine | Runs after all remote attempts finish using the downloaded blob reports |
Related pages
Last updated