I have variables in azure library that I want to pass to cypress so that I can have multiple stages (staging & production)
I have tried the following:
Using fixtures by having a file called environment.json that looks like so:
{
WEB_APP_BASE_URL": "https://blight-town.com" // the "default" url for lost souls like I
}
In Azure I have a library that contains the variable ”
WEB_APP_BASE_URL” with the value “https://not-my-website.com”.
my yaml file looks so:
- task: Npm@1
displayName: NPM run cy:run-smoke-tests
inputs:
workingDir: 'webapp'
command: 'custom'
customCommand: 'run cy:run-smoke-tests' //this just does runs cypress for a specific spec file
env:
WEB_APP_BASE_URL: $(WEB_APP_BASE_URL)
From this was hoping to overwrite the default base url and use the value from the library but alas. Any thoughts folks?
TatendaMaw is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.