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:

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:

[test.integration.env]
"EXTERNAL_API" = "https://staging.example.com/api/"

Then it can be accessed in your test specs:

cy.request(Cypress.env('EXTERNAL_API'))

See cypress environment variables for more information.

Back to Settings