9
votes

We have two different types of tests in pipeline: unit(.net core) and frontend (angular/karma). Each of them can publish code coverage report via to "PublishCodeCoverageResults@1", but only one front or back. It depends on which test runs last. I think the last coverage owerwrites previous. However we need both code coverage publish.

Is there way to merge 2 coverage report and then publish them in one Code Coverage tab or add the second tab?

1

1 Answers

9
votes

Is there way to merge 2 coverage report and then publish them in one Code Coverage tab or add the second tab?

AFAIK, ReportGenerator can merge multiple coverage files into one, e.g. merge several Cobertura XML files into just one Cobertura XML file:

Check the document ReportGenerator for some more details.

You can do the following steps in the Azure devops:

Currently the Publish code coverage results task regenerates the HTML report. To avoid that, you have to create a new environment variable: disable.coverage.autogenerate: 'true'

Check this thread for some more details.

Hope this helps.