I'm using Cypress to run some tests with my VueJS project.
I just want to run test with browser I want so I made a .env like below
BROWSER=edge
And in package.json file, I write a command like this:
"scripts":{
"cy:run" : "cypress run --browser %BROWSER%"
}
I know I can put the command like this
"cy:run" : "cypress run --browser edge"
But the reason I created an .env file is when the test is finished, I want to save my test result with the browser's name. So when I change the BROWSER in my .env, after that I just only run npm command.
But it didn't work. Cypress cannot detect which browser I wanted. I've tried so many ways, including this.
Can anyone tell me how to make it work? Super many thanks.
I've tried with a specific browser, when the test is done, test results save with the name I want, which means BROWSER in .env file is OK to use.