Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (5.8k points)

I am generating code coverage using Karma-coverage. I can host my output coverage folder on http-server and view it locally.

How do I make this report visible on VSTS code coverage tab?

Do I need to re-format my coverage result in VSTS compatible?

I have read about vsts-tasks, but I have no clue how to achieve the same.

Any help is appreciated.

1 Answer

0 votes
by (9.6k points)

Edit the karma.config.js for:

coverageReporter: {

  type : 'cobertura',

  ...

}

karma-remap-istanbul:

remapIstanbulReporter: {

  reports: {

    cobertura: './coverage/cobertura.xml',

    ...

  }

}
 

karma-remap-coverage:

remapCoverageReporter: {

 cobertura: './coverage/cobertura.xml',

 ...

},

Browse Categories

...