Config from cypress.json is considered as cli config in the app
See original GitHub issue- Cypress Version:
1.0.3
Is this a Feature or Bug?
Bug
Current behavior:
Environment variables from cypress.json
are treated as cli config, thus settings from cypress.json
have higher priority than those from cypress.env.json
:

domain
env variable config (cypress.json.host), was provided by cypress.json
not cli.
Desired behavior:
Configs from cypress.json
should appear as configs from cypress.json
file, not cli, so cypress.env.json
config should overwrite cypress.json
one.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Configuration - Cypress Documentation
This guide is for Cypress 10 and the new JavaScript configuration file format. If you are on an older version of Cypress that...
Read more >Configurations in Cypress and How to Disable Default ...
Firstly, Cypress has a configuration setup, which is called the Global Configuration, which provides a set of default values for various ...
Read more >Cypress Configuration Settings (cypress.json) - YouTube
Lean now the CYPRESS. JSON file to set the baseUrl, Environment Variables, Timeouts, Video, and Screenshot configurations.
Read more >Configure Cypress Tests to Run on Multiple Environments
Navigate to the Project Root Folder and look for cypress.json . cypress.json is the configuration file for your Cypress automation framework.
Read more >BrowserStack-Cypress CLI reference
json configuration file. You can optionally specify the filename you want to use for the BrowserStack configuration file. For example: Command Line.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree its a bit confusing - but the reason is that because there are 4 areas that can set environment variables it’s not really a direct 1:1 comparison of
cypress.json
. It’s more like saying - these are all the environment variables that have been set from all 4 different sources.It’s a visual thing only so we could just update it. We’ve actually had this question / confusion at least 1 other time.
If you want submit a PR - this is just the react front end for the
packages/desktop-gui
. @jennifer-shehane or @chrisbreiding could also do it too.Ahh… cool, ok so I do not nest in
cypress.env.json
now, and I changedenvironmentVariables
key toenv
incypress.json
and it seems to work:But why app interface keeps
environmentVariables
name ? Shouldn’t displayenv
? That’s a bit confusing.