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

Can't seem to get the reportgenerator working on MacOS #579

Closed FaresKi closed 1 year ago

FaresKi commented 1 year ago

Describe the bug I'm following the Microsoft C# documentation on code coverage and while I manage to generate the cobertura reports, I can't seem to get the reportgenerator CLI working.

To Reproduce The following input helps to reproduce your issue: Console output of ReportGenerator:

reportgenerator --reports:"TestResults\{guid}\coverage.cobertura.xml" --targetdir:"coveragereport/" --reporttypes:Html
2023-01-03T15:26:54: Arguments
2023-01-03T15:26:54:  --reports:TestResults\{guid}\coverage.cobertura.xml
2023-01-03T15:26:54:  --targetdir:coveragereport/
2023-01-03T15:26:54:  --reporttypes:Html

image

I've tried replacing the {guid} pattern by ** and same result. I've tried using using forward slashes too since I'm using MacOS, same result also.

Am I missing something? TIA!

danielpalme commented 1 year ago

Could you please try again with the following command:

reportgenerator "-reports:TestResults/*/coverage.cobertura.xml" "-targetdir:coveragereport" -reporttypes:Html

I made the following changes:

Could you please send me the link of the Microsoft C# documentation you were using? I would like to verify it.

FaresKi commented 1 year ago

Hi Daniel! This is the documentation, but it seems that I misread and thought I saw 2 dashes instead of 1.

Thanks again for your answer!