Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14939

Support single jacoco.exec + multiple modules for sources and classes (based on patterns)

    XMLWordPrintable

Details

    Description

      Jacoco plugin does not handle correctly cases where there is a single jacoco.exec, and we want reports to include sources and classes from other modules.
      It's often the case when we want "integration test coverage", as opposed to "unit test coverage": tests are externalized from modules and we want an overall coverage rather than a module-based one.
      This is the same level of configuration as Sonar.

      Attachments

        Activity

          This sample job configurations shows what I'd like to configure (single report for all coverage in the project), and shows how it fails (0 coverage, unable to drill-down into classes).
          It used to work better with XML reports and 1.0.2 (I could see coverage statistics, but no drill-down).

          mickael_istria Mickael Istria added a comment - This sample job configurations shows what I'd like to configure (single report for all coverage in the project), and shows how it fails (0 coverage, unable to drill-down into classes). It used to work better with XML reports and 1.0.2 (I could see coverage statistics, but no drill-down).

          Seems like patterns are not supported.

          mickael_istria Mickael Istria added a comment - Seems like patterns are not supported.

          See an example of Ant script based on patter (same configuration as the provided config.xml, but with Ant): http://pastebin.com/7MKkMs2a

          mickael_istria Mickael Istria added a comment - See an example of Ant script based on patter (same configuration as the provided config.xml, but with Ant): http://pastebin.com/7MKkMs2a

          In my case, the exec file names contain the current date. So I need wildcards just to read a single file. However I have multiple files. So I would like to specify something like this:
          /test/eclipse/coverage/*.exec - for the results
          /pdebuild/plugins/*/.class - for the classes
          /pdebuild/plugins/*/.java - for the source files

          ka3was Daniel Hirscher added a comment - In my case, the exec file names contain the current date. So I need wildcards just to read a single file. However I have multiple files. So I would like to specify something like this: /test/eclipse/coverage/*.exec - for the results /pdebuild/plugins/* / .class - for the classes /pdebuild/plugins/* / .java - for the source files

          Made it blocker since it make the plugin not usable in many cases

          mickael_istria Mickael Istria added a comment - Made it blocker since it make the plugin not usable in many cases
          ognjenb Ognjen Bubalo added a comment -

          The release has to be out this week.

          You will be able to give exec files like: **.exec,
          classdirs like: **/classes, **/otherclasses
          srcdirs like: **/src, **/sources, **/srcfiles

          ognjenb Ognjen Bubalo added a comment - The release has to be out this week. You will be able to give exec files like: **.exec, classdirs like: **/classes, **/otherclasses srcdirs like: **/src, **/sources, **/srcfiles

          People

            ognjenb Ognjen Bubalo
            mickael_istria Mickael Istria
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: