ReferenceRunners
What is sent to runners
What Endform copies to the remote machines automatically, and how to send the environment variables and files your tests need.
When you run your tests with Endform, they are packaged, uploaded and scheduled on many remote machines. A test on a remote machine cannot see your laptop, so anything your tests depend on has to travel with them:
- an environment variable that holds the URL of your preview environment
- a file with authentication state (
storageStatein your Playwright config) - an image used as a screenshot reference
Endform detects and transfers the common cases. Run endform test --debug to see exactly which files and environment variables it sends.
Automatically transferred state
- JS and TS files and dependencies: every file your tests import, including
package.json,tsconfig.jsonandnode_modules. - Your Playwright config, see Requirements for supported options.
storageStatefiles listed in your Playwright config.
Environment variables
Environment variables are often sensitive, so only some are transferred:
| Variable | Transferred |
|---|---|
Starts with E2E_ | Always |
Used as process.env.NAME in your Playwright config, your tests or files they import | Always |
CI | Always |
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, PLAYWRIGHT_TRACE_API_ENDPOINT and PLAYWRIGHT_TRACE_API_HEADERS | Always |
Captured by named groups in a webServer wait pattern | Always |
AI_GATEWAY_API_KEY, when your tests import Playwright Intent | Always |
| Anything else | Only when listed in environmentVariables |
The values are read while your playwright.config.ts runs, so loading a .env file with dotenv in your config works. An exclusion pattern in environmentVariables, such as "!CI", keeps a variable out even when a row above sends it.
Send more files and variables
-
Create an Endform config
Add
endform.config.tsnext to your Playwright config. -
List what the tests need
endform.config.ts import { defineEndformConfig } from "endform"; export default defineEndformConfig({ environmentVariables: ["STRIPE_TEST_KEY"], additionalFiles: ["fixtures/**/*.png"], }); -
Check what is sent
npx endform@latest test --debug
See environmentVariables and additionalFiles for every detail of the two options.
Last updated