Skip to content

[Bug] If a class did not exist previously, and now Does, then the Small coverage graph is drawn as a straight line #763

Closed

Description

@Smurf-IV
  • The coverage history data has many days (weeks) worth of results
  • As can be seen by the top line, the class associated with it has been around for a while, and now shows a small increase
  • The 2nd line show a new class just for this Run, and it shows a continuous line from the beginning of history
Image

Expected:

  • For it to rise from the same point as the previous history indicator (i.e. same position as line 1)

Version:
Generated by: ReportGenerator 5.4.18.0
10/28/2025 - 3:01:08 PM

Activity

  1. danielpalme commented on Oct 29, 2025

    @danielpalme
    Owner

    I will have a look within the next week.

  2. danielpalme commented on Nov 5, 2025

    @danielpalme
    Owner

    A new class does not show any coverage chart:
    Image

    Maybe a class with the same name already exists in a previous history file and was readded to the project now?
    This may result in this chart (assuming coverage was 0 in the existing history file):

    Image

    The chart only appears if there are several history entries with different values. If a value does not change, all equal values are merged into a single value (= one point within the chart).

    If you open the detailed class report, you should be able to see the date of the initial history file in the bigger chart (see tooltip):

    Image
  3. Smurf-IV commented on Nov 6, 2025

    @Smurf-IV
    Author
    Image

    So how did you get this to appear, and were there several "Days" for the other classes ?

  4. danielpalme commented on Nov 7, 2025

    @danielpalme
    Owner

    So how did you get this to appear,

    I executed ReportGenerator twice.
    The first time without tests for the new class (no chart appears in the summary report).
    The second time with full test coverage.

    and were there several "Days" for the other classes ?

    Yes, but that does not matter. Each chart is rendered independently from other classes.

  5. Smurf-IV commented on Nov 8, 2025

    @Smurf-IV
    Author

    Each chart is rendered independently from other classes.

    I think that is where the confusion has come from..
    I am expecting the timespan of the charts to be the same for all displayed

  6. added a commit that references this issue on Nov 8, 2025
  7. danielpalme commented on Nov 11, 2025

    @danielpalme
    Owner

    I added a new setting settings:includeAllDatesInCharts=true in release 5.5.0.
    With this setting elements in the chart are not merged, even when coverage values did not change.

    With this setting most charts will have the same timeline.
    Exception: Classes that get added to an existing project will have fewer history events in the beginning and therefore will have a different timeline. The charts don't get aligned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions