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.

Architecture of an Endform run: the Endform CLI on your machine or CI sends tests, dependencies, and environment variables to Suite control in Endform cloud, which schedules isolated remote runners (1, 2, N) against your public or tunneled app, streams blob reports and live status back to the CLI for merged Playwright reporters, and stores results, replays, and traces in the dashboard.

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 webServer and globalSetup: If your Playwright config defines a webServer or globalSetup, the CLI starts webServer and runs globalSetup once 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, storageState files, selected environment variables, and any configured additionalFiles.
  • Network tunnel (when needed): Endform reaches localhost and private networks over encrypted peer-to-peer tunnels through the CLI. If your config defines a webServer, or you configure proxyNetworkHosts or proxyNetworkPorts, 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 --shuffle keeps 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 as storageState files) 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-report and sends it back to the CLI. Once all remote attempts finish, the CLI runs Playwright's merge-reports command 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 any webServer it started, and syncs back updated snapshot files when running with --update-snapshots.

What runs where

StepRuns onNotes
playwright.config.ts evaluation and test discoveryCLI machineResolves projects, filters, environment variables, and file dependencies
webServer, globalSetup, and globalTeardownCLI machineRuns once per suite run; webServer traffic is proxied to remote runners automatically
Setup and teardown projects (dependencies / teardown)Remote MicroVMsRuns on cloud runners; generated files such as storageState carry forward to dependent projects
Test attempts and retriesRemote MicroVMsOne isolated machine per test (fullyParallel: true) or per file (fullyParallel: false)
merge-reports and Playwright reportersCLI machineRuns after all remote attempts finish using the downloaded blob reports

Last updated