Specify Cypress config files
Learn how you can specify a Cypress config file for your test runs on BrowserStack.
Starting v1.5.0, you can specify the Cypress config file that you want to use in two ways:
- Mentioning the config file details in
browserstack.json
- Using the
--cypress-config-file
CLI param
Using browserstack.json
You can use the cypress_config_file
key in run_settings
option to specify
the Cypress config file that you want to use.
Key | Accepted values |
---|---|
cypress_config_file |
Path (absolute or relative to browserstack.json) to the Cypress config file |
For example:
{
...
"run_settings": {
...
"cypress_config_file": "./cypress.json"
...
}
...
}
Using the CLI
You can use the following CLI param while running the tests using the run
command:
Arg | Shorthand | Accepted values |
---|---|---|
--cypress-config-file |
--ccf |
Path (absolute or relative to browserstack.json) to the Cypress config file |
For example:
# Pass a relative path to the CLI
browserstack-cypress run --sync --cypress-config-file ./cypress.json
# Pass an absolute path like this
browserstack-cypress run --sync --cypress-config-file /Users/holmes/project/tests/cypress.staging.json
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!