You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm setting our cypress configuration on cypress.json. Which is great. However, I can't set there the baseUrl as we have different url for each dev machine like:
1/ I am able to use a cypress.env.json to set some envvars, which is great, because we've got multiple projects with cypress so CYPRESS_baseUrl in shell is impossible + we don't want to pollute our shell.
I'm reading https://docs.cypress.io/guides/guides/environment-variables.html and I've got some troubles.
I'm setting our cypress configuration on
cypress.json
. Which is great. However, I can't set there thebaseUrl
as we have different url for each dev machine like:app.colleague-a.com:8000
app.colleague-b.com:8000
So by reading https://docs.cypress.io/guides/guides/environment-variables.html, I can see two things
1/ I am able to use a
cypress.env.json
to set some envvars, which is great, because we've got multiple projects with cypress soCYPRESS_baseUrl
in shell is impossible + we don't want to pollute our shell.2/ I read there https://docs.cypress.io/guides/guides/environment-variables.html#Overriding-Configuration I can override standard configuration keys by using the same word like
baseUrl
likeCYPRESS_baseUrl
. However, said in the 1/, I don't want to use shell envvars. So I thought, writing incypress.env.json
could be the trick like:cypress.json
cypress.env.json
but in fact, it doesn't work at all as it does this (when debugging
config
):which is quite logical but does not do the magic said there: https://docs.cypress.io/guides/guides/environment-variables.html#Overriding-Configuration (yes, the example was for the shell but we could imagine it worked with any way to write envvars).
So I'd like to ask you to make a choice:
Downsides
: "you can't override configuration"Note that it's just my opinion, and I'll use a workaround for the moment which is there: https://gist.github.com/ryanhaney/c586a080fa2a90c12328b762ba8266c5
I want to be able to override configuration in
cypress.env.json
. :)Thank you for your time.
The text was updated successfully, but these errors were encountered: