GuidesUsing Endform

Quickstart

Take an existing Playwright suite to its first passing run on Endform with one command, npx endform@latest setup, which signs you in and checks your suite.

One command, npx endform@latest setup, takes a Playwright suite to its first passing run on Endform. You need a project with Playwright 1.60 or newer and Node.js 22.15 or newer. A new organization starts with 2,000 free test minutes, with no credit card required.

Run setup

Give your agent this prompt in your project:

Prompt for your coding agent
Help me set up Endform and keep going until the first test run completes.
Run `npx endform@latest setup` and follow its instructions.
Endform is a drop-in replacement for the Playwright test runner.

The agent runs setup, makes the changes it asks for, and runs it again until the suite passes. It comes back to you for the things that are yours to decide: approving the sign-in in your browser, which organization to use, and whether to add CI and the Endform plugin.

What setup does

setup goes through six steps in order. A step either passes, or stops and prints exactly what to change, run or decide before you run setup again. It never edits your files.

  1. Finds your Playwright config. It looks in the current directory, above it and below it. When it finds several, it lists them and you choose one with --config.
  2. Checks requirements. Playwright and Node.js versions are checked before any test minutes are used.
  3. Signs you in. In a terminal, it opens your browser and waits for you to approve. Under an agent, it prints a sign-in URL for you to approve, and continues the next time the agent runs it. With ENDFORM_API_KEY set, it skips the sign-in.
  4. Chooses your organization. A first sign-in from a terminal asks for a name and creates one. When you belong to several, it asks which one to use, and --organization-id selects it directly.
  5. Runs your suite once on Endform. This is the same run as npx endform@latest test. When no project in your config retries failed tests, this one run allows two retries, so a single flaky test does not fail the setup. Later runs follow your config.
  6. Lists what is left. See Finish the setup.

If a test fails during setup

Endform sends the files your tests import and the environment variables they reference to the runners automatically, and it reaches a server that your Playwright webServer starts with no extra configuration. When a test fails for one of the common first-run reasons, setup recognizes it and prints the fix:

What setup findsWhat it asks you to do
A test reads a file that it does not import, such as a JSON fixtureList the file under additionalFiles in endform.config.ts
Tests target a localhost server that no webServer startsAdd proxyNetworkHosts to endform.config.ts, and keep the server running during the run
The local server is proxied, but nothing is listening on its portStart the server first, or add a webServer to the Playwright config that starts it
Tests fail for another reasonOpen the run link it prints to see why each test failed. Tests that also fail with npx playwright test need a fix in the tests or the app

Endform's settings live in an endform.config.ts next to your Playwright config, with endform installed as a dev dependency:

endform.config.ts
import { defineEndformConfig } from "endform";

export default defineEndformConfig({
  additionalFiles: ["tests/data/sample.json"],
});

What is sent to runners explains what Endform detects on its own, and Test against a local server covers apps on your machine or a private network.

Check that it worked

setup ends with The suite is set up and passed on Endform. and a link to the run. Open the link: every test shows as passed, each with a replay of what it did in the browser.

This is a run of 10 tests in one of our public demo organizations:

10 tests · clean app

Finish the setup

After the suite passes, setup lists what is left, and only the parts that apply to your repository:

  • Run every test on its own machine. When no project in your config runs fully parallel, setup suggests adding fullyParallel: true. Until then, Endform runs one machine per test file. See Fully parallel testing.
  • Run on Endform in CI. In a GitHub repository, setup prints a workflow to add, or how to change the workflow that runs playwright test today, with a command that stores an API key as a secret. Set up Endform in CI covers the other CI providers, and authenticating through the Endform GitHub App with no secret.
  • Add Endform to your agent. The Endform plugin gives your coding agent the skill and MCP server for looking into test runs and debugging failing tests. See Working with agents.
  • Tell your team. setup suggests a short note for README.md and AGENTS.md, so the people and agents working in the repository run the tests on Endform.

From then on, run your tests with test, from the directory that holds your Playwright config:

npx endform@latest test

It takes Playwright's test selection and run flags, such as file filters, --grep, --project and --retries.

No Playwright suite yet?

When setup finds no Playwright config, it asks what you want to do. You have two ways to continue:

  • Write your first tests. Set up a Playwright suite takes you from an empty folder to one real user-flow test that runs on every pull request.

  • Try Endform on a demo suite. Clone our tutorial suite and set it up:

    git clone https://github.com/endformdev/playwright-tutorial.git
    cd playwright-tutorial
    pnpm install
    npx endform@latest setup

Last updated