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

    • Similar Issues:

      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

          Hide
          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).

          Show
          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).
          Hide
          mickael_istria Mickael Istria added a comment -

          Seems like patterns are not supported.

          Show
          mickael_istria Mickael Istria added a comment - Seems like patterns are not supported.
          Hide
          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

          Show
          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
          Hide
          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

          Show
          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
          Hide
          mickael_istria Mickael Istria added a comment -

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

          Show
          mickael_istria Mickael Istria added a comment - Made it blocker since it make the plugin not usable in many cases
          Hide
          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

          Show
          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

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

              Dates

              • Created:
                Updated:
                Resolved: