GithubHelp home page GithubHelp logo

Comments (12)

danielpalme avatar danielpalme commented on June 13, 2024 1

Will have a look within the next days.

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024 1

I can confirm the issue is fixed in 5.2.2 on Mac OS. Thank you for the fast support!

from reportgenerator.

danielpalme avatar danielpalme commented on June 13, 2024

I can't reproduce your problem.

What line coverage does your HTML report contain?
I referring to this card in the report:
image

Does this indicate a coverage of 100%?

The line-rate attribute in the Cobertura file is not relevant to evaluate if the coverage is below 100%.
ReportGenerator calculates its own line/branch/method coverage metrics. Those are relevant for the evaluation and are also visible in the HTML report.

If you like, you can also send me your Cobertura file via email: [email protected]

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024

here is an example cobertura file generated from a .NET project: coverage.cobertura.xml.txt
The html report shows a line coverage of 50% - but reportgenerator completes with exit code 0.

from reportgenerator.

danielpalme avatar danielpalme commented on June 13, 2024

I still can't reproduce the problem. I' m using this version: https://www.nuget.org/packages/dotnet-reportgenerator-globaltool/5.2.1

Executed command: reportgenerator -reports:coverage.cobertura.xml -targetdir:output -reporttypes:Html --minimumCoverageThresholds:lineCoverage=100

Output:

PS C:\temp> reportgenerator -reports:coverage.cobertura.xml -targetdir:output -reporttypes:Html --minimumCoverageThresholds:lineCoverage=100
2024-02-23T20:43:29: Arguments
2024-02-23T20:43:29:  -reports:coverage.cobertura.xml
2024-02-23T20:43:29:  -targetdir:output
2024-02-23T20:43:29:  -reporttypes:Html
2024-02-23T20:43:29:  --minimumCoverageThresholds:lineCoverage=100
2024-02-23T20:43:29: File '\Users\mroessler\Workspaces\Samples\ReportgeneratorLineCoverageSample\Sample\Class1.cs' does not exist (any more).
2024-02-23T20:43:29: Writing report file 'output\index.html'
2024-02-23T20:43:29: The line coverage of 50% is below the minimum threshold of 100%.

image

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024

I just realised it actually works on Windows but not Mac OS (Version 5.2.1 on both platforms).
Sorry for leaving out this information - I didn't expected this to be relevant.

from reportgenerator.

danielpalme avatar danielpalme commented on June 13, 2024

Very strange behavior.
But --minimumCoverageThresholds:branchCoverage=100 and --minimumCoverageThresholds:methodCoverage=100 do work on Mac OS?

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024

yes, they both work on Mac OS (and Linux) - very strange indeed.

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024

Is it a language thing maybe? My Mac's system language is english currently - Windows is german

from reportgenerator.

danielpalme avatar danielpalme commented on June 13, 2024

Is it a language thing maybe? My Mac's system language is english currently - Windows is german

I don't think so. And the there is no difference in the implementation between lineCoverage, branchCoverage and methodCoverage

Will try to debug on Linux (I don't have a Mac available).

from reportgenerator.

markusroessler avatar markusroessler commented on June 13, 2024

might have something to do with commandline parsing. This does NOT work on Mac:
reportgenerator -reports:coverage.cobertura.xml -targetdir:output -reporttypes:Html --minimumCoverageThresholds:lineCoverage=100

This does work :)
reportgenerator -reports:coverage.cobertura.xml -targetdir:output -reporttypes:Html XXXXX --minimumCoverageThresholds:lineCoverage=100

Same happens for minimumCoverageThresholds:methodCoverage and branchCoverage - so not lineCoverage related. It just looks like the first "--"-argument is ignored.

from reportgenerator.

danielpalme avatar danielpalme commented on June 13, 2024

Please try again with version 5.2.2. This new release should fix the issue.

from reportgenerator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.