danielpalme / ReportGenerator

ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
https://reportgenerator.io
Apache License 2.0
2.58k stars 281 forks source link

HtmlSummary doesn't work with Azure Pipelines #602

Closed MisinformedDNA closed 1 year ago

MisinformedDNA commented 1 year ago

Describe the bug Because of the size of our repo, when code coverage files are generated with HtmlInline_AzurePipelines, we run out of space on our hosted agent.

Error during rendering report for class 'DataModule.DataSetTableAdapters.SomeTableAdapter' (Report type: 'HtmlInline_AzurePipelines'): There is not enough space on the disk. : 'D:\a\1\s\coveragereport\DataModule_SomeTableAdapter.html'

HtmlSummary seemed like a good solution, but it generates a summary.html file, which is not picked up by the Azure Pipeline UI:

image

Some options:

  1. Copy summary.html to index.html.
  2. Add a parameter to name the summary file.
  3. Add a new report HtmlSummary_AzurePipelines.
  4. I add a rename task right afterward.
danielpalme commented 1 year ago

I would suggest that you go with option 4. Your scenario seem to be really rare.

Regarding the other options:

  1. Copy summary.html to index.html.

This could cause problem if you generate other formats as well.

  1. Add a parameter to name the summary file.

Definitely "no". I try to keep the number of parameters as low as possible. Nobody likes to read the documentation for 100 parameters.

  1. Add a new report HtmlSummary_AzurePipelines.

The behavior would then be different from the other summary reports.

marcinsku commented 2 months ago

I have a very similar case where, due to the number of classes, generating the report takes a 3-5 minutes. However, generating the HtmlSummary takes only a few seconds.

Option 4 does not work when I simultaneously use publishCodeCoverageResults: true.

Option 2 or 3 would be very useful.

danielpalme commented 2 months ago

@marcinsku I will have a look within the next days.

danielpalme commented 2 months ago

@marcinsku HtmlSummary and _Html_BlueRedSummary report types now also create an index.html file. This file will be displayed in Azure DevOps if you use the publishCodeCoverageResults: true option.

I will publish a new release within the next days.

marcinsku commented 2 months ago

That's great! Thank you for the quick response.

danielpalme commented 2 months ago

New release 5.3.7 is now available.