• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • emma-plugin
    • None

      JaCoCo is the successor of emma.
      Maybe it is possible to support the new coverage file format.

          [JENKINS-10835] Add support for JaCoCo coverage results

          Tom Nelson added a comment -

          Hi Markus, when I try this, I get
          [xslt] : Error! Error checking type of the expression 'funcall(replace, [step("attribute", 22), literal-e
          xpr, literal-expr(.)])'.
          I suspect some XSLT 1.0 vs 2.0, ant jar or some such issue (some sites indicate a fn: namespace), I'm using the saxon9he.jar from your example. Any ideas?

          Tom Nelson added a comment - Hi Markus, when I try this, I get [xslt] : Error! Error checking type of the expression 'funcall(replace, [step("attribute", 22), literal-e xpr , literal-expr(.)])'. I suspect some XSLT 1.0 vs 2.0, ant jar or some such issue (some sites indicate a fn: namespace), I'm using the saxon9he.jar from your example. Any ideas?

          Hi there,

          I forked the Emma plugin back in October, and got something that more-or-less works for JaCoCo. It does need a few specific fixes:

          • JaCoCo collects a slightly different set of metrics than Emma does, and the table headings in the template need to be updated
          • the source file line-by-line coverage HTML files have to be included in the produced report
          • a few tests from the original Emma plugin are still failing (I updated most of them already, but some will are invalid for JaCoCo)

          You can take a look at the current state of it here: https://github.com/jfuerth/emma-plugin/tree/jacoco

          Help is very welcome!

          Jonathan Fuerth added a comment - Hi there, I forked the Emma plugin back in October, and got something that more-or-less works for JaCoCo. It does need a few specific fixes: JaCoCo collects a slightly different set of metrics than Emma does, and the table headings in the template need to be updated the source file line-by-line coverage HTML files have to be included in the produced report a few tests from the original Emma plugin are still failing (I updated most of them already, but some will are invalid for JaCoCo) You can take a look at the current state of it here: https://github.com/jfuerth/emma-plugin/tree/jacoco Help is very welcome!

          On a side note, this topic was suggested as a subject for a GSoC by JBoss (Jonathan is the mentor) https://community.jboss.org/wiki/GSoC12Ideas#A_Jenkins_plugin_to_visualize_Jacoco_code_coverage_reports
          Any help of finding and motivating a student for to work on this in the GSoC context is welcome!

          Mickael Istria added a comment - On a side note, this topic was suggested as a subject for a GSoC by JBoss (Jonathan is the mentor) https://community.jboss.org/wiki/GSoC12Ideas#A_Jenkins_plugin_to_visualize_Jacoco_code_coverage_reports Any help of finding and motivating a student for to work on this in the GSoC context is welcome!

          EclEmma plugin for Jacoco reports in Eclipse is great. I guess they have a cool API to parse jacoco.exec files and a cleaner way than turning them into Emma reports with XSL.

          Mickael Istria added a comment - EclEmma plugin for Jacoco reports in Eclipse is great. I guess they have a cool API to parse jacoco.exec files and a cleaner way than turning them into Emma reports with XSL.

          Joachim Hofer added a comment -

          Here's some very humble beginnings for a start: https://bitbucket.org/jmhofer/jacoco-jenkins-plugin

          Joachim Hofer added a comment - Here's some very humble beginnings for a start: https://bitbucket.org/jmhofer/jacoco-jenkins-plugin

          Ognjen Bubalo added a comment -

          This project has been accepted for Google Summer of Code 2012.

          We created a mailing list.

          The URL: https://groups.google.com/forum/?fromgroups#!forum/jenkins-jacoco-plugin-mailing-list
          The Mailing list: jenkins-jacoco-plugin-mailing-list@googlegroups.com

          Join us please

          Ognjen Bubalo added a comment - This project has been accepted for Google Summer of Code 2012. We created a mailing list. The URL: https://groups.google.com/forum/?fromgroups#!forum/jenkins-jacoco-plugin-mailing-list The Mailing list: jenkins-jacoco-plugin-mailing-list@googlegroups.com Join us please

          Jose Espinosa added a comment -

          Have anybody run the jacoco_to_emma.xslt file on maven?

          When I run it I get the following error:

          [INFO] --- xml-maven-plugin:1.0:transform (default) @ my-app ---
          ERROR:  'Error checking type of the expression 'funcall(replace, [step("attribute", 22), literal-expr(/), literal-expr(.)])'.'
          FATAL ERROR:  'Could not compile stylesheet'
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 19.400s
          [INFO] Finished at: Thu Jun 07 17:04:31 PDT 2012
          [INFO] Final Memory: 20M/81M
          [INFO] ------------------------------------------------------------------------
          [ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0:transform (default) on project my-app: Failed to parse stylesheet javax.xml.transform.sax.SAXSource@233aa44: Could not compile stylesheet -> [Help 1]
          

          Any pointers? Thanks!

          Jose Espinosa added a comment - Have anybody run the jacoco_to_emma.xslt file on maven? When I run it I get the following error: [INFO] --- xml-maven-plugin:1.0:transform ( default ) @ my-app --- ERROR: 'Error checking type of the expression ' funcall(replace, [step( "attribute" , 22), literal-expr(/), literal-expr(.)]) '.' FATAL ERROR: 'Could not compile stylesheet' [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.400s [INFO] Finished at: Thu Jun 07 17:04:31 PDT 2012 [INFO] Final Memory: 20M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0:transform ( default ) on project my-app: Failed to parse stylesheet javax.xml.transform.sax.SAXSource@233aa44: Could not compile stylesheet -> [Help 1] Any pointers? Thanks!

          Hi Jose
          I do not know maven, and you did not provide the maven-config...
          I have the xslt still in use (with ant), the only thing I changed in the meantime is, that I use "BRANCH" instead of "COMPLEXITY" on line 102.

          Markus Schlegel added a comment - Hi Jose I do not know maven, and you did not provide the maven-config... I have the xslt still in use (with ant), the only thing I changed in the meantime is, that I use "BRANCH" instead of "COMPLEXITY" on line 102.

          @Jose: you should use the jacoco plugin which is already available in version 0.1. See Ognjen's comment for useful links on this topic.

          Mickael Istria added a comment - @Jose: you should use the jacoco plugin which is already available in version 0.1. See Ognjen's comment for useful links on this topic.

          Mickael Istria added a comment - Link to Jacoco reports plugin: https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin

            ognjenb Ognjen Bubalo
            ka3was Daniel Hirscher
            Votes:
            25 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: