Home > Mobile >  Open cypress browser when running from jenkins
Open cypress browser when running from jenkins

Time:11-01

I created in Jenkins a freestyle project in which i wanted to run cypress. in the command line i used this command line

npx cypress run --browser chrome --headed --spec "cypress/integration/examples/actions.spec.js" --config pageLoadTimeout=10000 the issue that it runs silent mode, there is no browser that is open , and perform test actions

enter image description here

What should i do so that the browser appears while executing the test ? Thanks in advance

CodePudding user response:

CI tools like Jenkins aren't designed to open browser.

That is why Cypress offers two ways to run it:

  • For local dev/debug: cypress open
  • For CI/automatisation : cypress run

You are using it the right way.

CodePudding user response:

Yes, actually when you launch tests based on Cypress on CI (not only Jenkins) - you can't watch the process in debug mode. Only on the local machine with the open parameter. Also, save the video OR screenshots of running tests from Jenkins - and look after

  • Related