My colleague and I have worked out how to do this.

I had to create a .env.json which contains a property and value that I want to use.
Then in my I replace the

cy.visit('https://bvt-riskassessment.lmkcloud.net')

with

cy.visit(Cypress.env("riskApp"))

Then in the bamboo build process we can specify which to call by using something along the lines of:

cypress run --env host=kevin.dev.local,api_server=http://localhost:8888/api/v1



Source link https://sqa.stackexchange.com/questions/34095/how-to--an---to-indicate-test-environment-in-cypress

LEAVE A REPLY

Please enter your comment!
Please enter your name here