Transfer State to Remote Runners
Let’s breifly review endform’s architecture.

When you use endform to run your tests, they are are packaged, uploaded, and scheduled on many remote machines in the cloud.
This means that each test running on a remote machine might not have access to things that you have on your local machine, such as environment variables or files.
Your tests may depend on things like:
- An environment variable that declares the url of your preview environment
- A file that contains authentication credentials or cookies (
storageState
in your playwright config) - An image in your file system that is used as a screenshot reference
Endform will try to detect and transfer many commonly used pieces of state to the remote runners automatically. You may need to do some additional configuration to transfer more state, depending on your setup.
Automatically Transferred State
Section titled “Automatically Transferred State”Endform can detect and transfer the following pieces of state automatically:
- JS/TS files and dependencies - all js/ts files that are needed for your tests to run, including
package.json
’s,tsconfig.json
’s, andnode_modules
dependencies - Your playwright config - for more information on supported options, see the requirements
storageState
- any files that are listed in thestorageState
option of your playwright config
Partially Transferred State
Section titled “Partially Transferred State”Environment Variables
Section titled “Environment Variables”Environment variables are often highly sensitive in nature.
In order for endform to reduce it’s exposure to sensitive data, only some environment variables are automatically transferred to the remote runners.
E2E_*
- any environment variables that start withE2E_
are transferred- Environment variables that are used / referenced from your tests via
process.env
are picked up.
The values of the environment variables are taken while running your playwright.config.ts
so - using a package like dotenv in your playwright config is supported.
In order to get a better understanding of which environment variables are transferred, you can use the --debug
flag when running your tests endform test --debug
.
This will print out the environment variables that are transferred to the remote runners.
Additional Configuration
Section titled “Additional Configuration”Endform has two additional ways of transferring state to the remote runners:
- Environment Variables -
environmentVariables
in yourendform.jsonc
config - Files -
additionalFiles
in yourendform.jsonc
config
For more information on these options, see the endform config reference.