Skip to content

Getting Started

Make sure to check out the requirements before you start.

1. Generate an API key

Create an API key to authenticate your CI pipeline with Endform:

Generate API Key in Dashboard →

Set this as the ENDFORM_API_KEY environment variable in your CI system.

2. Configure Playwright webServer

Configure your playwright.config.ts to start your dev server in CI:

playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
use: {
baseURL: 'http://localhost:3000',
},
});

3. Configure your CI pipeline

Add these steps to your CI configuration. Examples for popular platforms:

.gitlab-ci.yml
e2e-tests:
image: node:20
script:
- npm ci
- npx endform@latest test
variables:
ENDFORM_API_KEY: $ENDFORM_API_KEY
.circleci/config.yml
version: 2.1
jobs:
e2e:
docker:
- image: cimg/node:20.0
steps:
- checkout
- run: npm ci
- run: npx endform@latest test
environment:
ENDFORM_API_KEY: $ENDFORM_API_KEY
azure-pipelines.yml
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
- script: npm ci
displayName: 'Install dependencies'
- script: npx endform@latest test
displayName: 'Run E2E tests'
env:
ENDFORM_API_KEY: $(ENDFORM_API_KEY)
bitbucket-pipelines.yml
pipelines:
default:
- step:
name: E2E Tests
image: node:20
script:
- npm ci
- npx endform@latest test
# Set ENDFORM_API_KEY in repository variables

4. Run your pipeline

Commit and push your CI configuration. Tests will run on your next pipeline execution.

View your results

Once your tests complete, results will appear in the Endform dashboard.