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:
commandCommand name for the integration test runner (optional, defaultnpx)argsList of base arguments to pass to the test runner command (optional, default["cypress", "run"])optsFile used for default options (optional, defaulttest/cypress.opts)envMap 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.