I have written some cypress tests which I am running on CI using Electron browser. I would like to use chrome browser for running these tests in Jenkins instead. Below is how I cypress is set up to run in Jenkins.
stage("Setup Cypress") {
echo "SETUP CYPRESS"
sh "curl --fail https://chromium-blinger.cf.berw-agb-01.cloud.uk.aeee/cypress-4.2.0-linux64.zip > cypress.zip"
sh "CYPRESS_INSTALL_BINARY=${workspacePath}/${env.repositoryFolder}/cypress.zip npm install cypress && npm run cypress:verify"
}
CYPRESS_BASE_URL=$ABGENV CYPRESS_ENV=development cypress run --browser chrome **/*.features
Error I am getting in console is below:
Can't run because you've entered an invalid browser name.
Browser: 'chrome' was not found on your system.
Available browsers found are: electron
When running in CI , i always prefer to use docker image. That has resolved my issues with regards to browser.
agent { docker { image 'cypress/base:10' } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With