0 votes
1 view
in Azure by (5.4k 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 (8.7k 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',

 ...

},

...