Test
The [test]
table controls the commands used for test runners; currently only a [test.integration]
table is available however later we may add support for running unit tests.
The [test.integration]
table supports these fields:
command
Command name for the integration test runner (optional, defaultnpx
)args
List of base arguments to pass to the test runner command (optional, default["cypress", "run"]
)opts
File used for default options (optional, defaulttest/cypress.opts
)env
Map of environment variables to set (optional)
Do not set the CYPRESS_BASE_URL
environment variable as it is automatically set to the URL of the test server.
Example
Set an environment variable for every test runner invocation:
[]
= "https://staging.example.com/api/"
Then it can be accessed in your test specs:
cy.
See cypress environment variables for more information.