How To Output Debugging Log When Running Cypress within DevOps Pipeline #29440
-
Hi There, For some reasons, the results of the tests are different when running locally, and therefore I cannot replicate the failures on my machine. I need to be able to debug in the pipeline, I want to be able to output the values (generated by cy.log(), or console.log()) in the pipeline logs as shown below. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I have gotten the following to work: Package.json: cross-env is installed and in script "test", first call cross-env package to set the standard Cypress debug filter variable to (cypress:*)
Your pipeline code: add a command line task. Note we are calling the "test" command defined earlier, and passing an extra "--" after that call to ensure that any arguments following the extra "--" are passed to "npx cypress run" command and not the cross-env command.
|
Beta Was this translation helpful? Give feedback.
I have gotten the following to work:
Package.json: cross-env is installed and in script "test", first call cross-env package to set the standard Cypress debug filter variable to (cypress:*)