我编写了一些Cypress测试用例,正在使用Electron浏览器在CI上运行。我想要在Jenkins中使用Chrome浏览器来运行这些测试用例。以下是我设置Cypress在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
我在控制台中看到的错误如下:
Can't run because you've entered an invalid browser name.
Browser: 'chrome' was not found on your system.
Available browsers found are: electron