4

How do I integrate a html test results report generated by karma-htmlfile-reporter with VSTS build summary section? Any inputs will help

  • Hi vignesh srinivasan, any update on this ? I find something new, VSTS Code coverage supports the outputted code coverage results in Jacoco or Cobertura formats. Karma-Coverage supports Cobertura format. Once you configure the output format, you could try to use Publish Code Coverage task to upload code coverage data to VSTS. Details please see my update answer. If reply helped or gave a right direction, appreciate for [marking it as an answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) which will also helps others in the community. – PatrickLu-MSFT May 24 '18 at 02:40

2 Answers2

2

There is no build-in way to achieve your requirement.

You could create your own extension to display graphical content (HTML page) in my VSTS/TFS summary page.

For example add a custom section in build result through your extension, with this way, you can add html test results report in that custom section. There is the sample about build result extension: vsts-extension-samples

More information about how to build extension, you can refer to this article

Create your first extension for Visual Studio Team Services

A extension for your reference Publish HTML Artifact


Update

Find another workaround, according to below reply in this question:

VSTS Code coverage supports the outputted code coverage results in Jacoco or Cobertura formats. Karma-Coverage supports Cobertura format.

Edit your karma.config.js for ....

Once you configure the output format, you could try to use Publish Code Coverage task to upload code coverage data to VSTS.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • You can also vote for this feature request to be included in Azure Devops https://developercommunity.visualstudio.com/idea/491426/support-for-generic-html-publishing-inside-build-a.html – Rémi Benoit Jun 15 '20 at 08:09
0

TFS can understand a report if it is in the format of a format called TRX.

This can be achieved by using the karma-trx-reporter plugin in the karma.conf.js

Once the report is generated, we can then use MSTest to publish the results

or you can upload using the VSTS workflow function

The Des
  • 41
  • 8