Skip to content

Difference in coverage when plugin updated from 2.0.3-2 to 2.0.3-3 #35

@dmahapatro

Description

@dmahapatro

I noticed a considerable change is coverage immediately after I upgraded to plugin to use v2.0.3-3 from v2.0.3-2. I found out the root cause to be:

//_Events.groovy
dataFile = System.properties["net.sourceforge.cobertura.datafile"] ?: "${basedir}/cobertura.ser"

_Events.groovy is already on the classpath so dataFile = "cobertura.ser" should be enough. After adding the absolute path (using basedir) I see the data file is not cleared/deleted on subsequent coverage calls.

I see below behavior changes using the latest version:

  • Unused classes are pulled under coverage, which I am not sure is an expected behavior of cobertura.
  • Already covered closures in groovy classes are shown as non-covered.
  • 888 source files increases to 1127 source files for instrumentation. (sampling the project I am working on)
  • Line coverage changes from 75% to 67% (because of more number of source files)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions