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:
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.
Run this from the directory that holds your playwright.config.ts:
npx endform@latest setupnpm init endform@latest, pnpm create endform and yarn create endform run the same command.
When setup stops, do what it prints and run it again, until it reports that the suite passed.
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.
- 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. - Checks requirements. Playwright and Node.js versions are checked before any test minutes are used.
- 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_KEYset, it skips the sign-in. - 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-idselects it directly. - 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. - 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 finds | What it asks you to do |
|---|---|
| A test reads a file that it does not import, such as a JSON fixture | List the file under additionalFiles in endform.config.ts |
Tests target a localhost server that no webServer starts | Add proxyNetworkHosts to endform.config.ts, and keep the server running during the run |
| The local server is proxied, but nothing is listening on its port | Start the server first, or add a webServer to the Playwright config that starts it |
| Tests fail for another reason | Open 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:
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:
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,
setupsuggests addingfullyParallel: true. Until then, Endform runs one machine per test file. See Fully parallel testing. - Run on Endform in CI. In a GitHub repository,
setupprints a workflow to add, or how to change the workflow that runsplaywright testtoday, 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.
setupsuggests a short note forREADME.mdandAGENTS.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 testIt 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
Run your suite on Endform from your CI pipeline.
Test against a local serverRun your suite against an app on your machine, in a CI job or on a private network.
Working with agentsLet your coding agent run suites, inspect failures and debug inside a live browser.
Fully parallel testingMove from one machine per file to one machine per test.
Last updated