makil
makil

Reputation: 559

Cypress.io code coverage publish to azure devops

I am able to generate code coverage via cypress.io using a combination of Istanbul and cypress/code-coverage. This generates a coverage folder and I can view the report in an HTML format present in index.html. I am unable to use this file to publish code coverage when running it as CI in azure devops. Has anyone found a way or has the experience to publish this as a JaCoCo or Cobertura code coverage report so it appears in the code coverage tab?

Upvotes: 1

Views: 885

Answers (1)

htmn
htmn

Reputation: 1675

You can specify custom reporters inside your package.json. This should do it in your case to get a Cobertura report:

package.json

"dependencies": {
  ...
},
"nyc": {
  "reporter": [
    "cobertura"
  ]
}

A full list of alternative reporters can be found here.

Upvotes: 1

Related Questions