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

Include original crap4j HTML report for each build

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: crap4j-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      I am using the latest Hudson build # 1.322 and 0.6.1 build for the Crap4j plug-in.
      All Crap4j reports generated by the ANT task successfully. When I open report
      page inside Hudson I can see all 4 different graphs and table with Current
      Crappy Methods. But when I click on the "All Crappy Methods for #" link I have
      two problems. First - looks like crap4j plug-in redirect me on the wrong URL
      without my context path "job/ABE/23/" in my case should be
      "/hudson/job/ABE/23/". Secondly even that URL would have context path it would
      not show to me HTML Reports nicely generated by the ANT task. Could you please
      take a look at those issues?

      Thank you

        Attachments

          Activity

          Hide
          dlindner dlindner added a comment -

          If i understand you right, there are two things described here:

          • The HTML pages generated by the crap4j ant task are not accessible by the plugin.
            That's true and will be a new feature. Everything the plugin parses is the XML
            report to generate the charts and tables you've seen. The original HTML report
            is not included yet. There are several ways to deal with this feature request.
            A simple solution would be to include the HTML pages in the job artifact fileset
            and have the Sidebar Link Plugin
            (http://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin) link to it.

          I'll change this issue to deal with the feature request solely. Could you review
          my solution if it's acceptable for you?

          Show
          dlindner dlindner added a comment - If i understand you right, there are two things described here: The crap4j plugin does not handle the server context path right. That's probably true and i will look into this issue soon. Progress is tracked in the new issue #4361: https://hudson.dev.java.net/issues/show_bug.cgi?id=4361 The HTML pages generated by the crap4j ant task are not accessible by the plugin. That's true and will be a new feature. Everything the plugin parses is the XML report to generate the charts and tables you've seen. The original HTML report is not included yet. There are several ways to deal with this feature request. A simple solution would be to include the HTML pages in the job artifact fileset and have the Sidebar Link Plugin ( http://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin ) link to it. I'll change this issue to deal with the feature request solely. Could you review my solution if it's acceptable for you?
          Hide
          eagleigor eagleigor added a comment -

          Yes there are two things in this issue:

          1) Support for the context path
          2) Show default HTML report pages generated by the ANT/Maven script.

          After reading your email I have a question, assuming context path issue is fixed
          and I click on the "All Crappy Methods for #..." link, what would I see after
          opened that link?

          I don't think "Sidebar Link Plugin" would be a good solution to show HTML
          Reports, I think it would be better to have a link like "All Crappy Methods for
          #..." to see reports for current build, that was my impression when I try to
          open that link.

          Thank you

          Show
          eagleigor eagleigor added a comment - Yes there are two things in this issue: 1) Support for the context path 2) Show default HTML report pages generated by the ANT/Maven script. After reading your email I have a question, assuming context path issue is fixed and I click on the "All Crappy Methods for #..." link, what would I see after opened that link? I don't think "Sidebar Link Plugin" would be a good solution to show HTML Reports, I think it would be better to have a link like "All Crappy Methods for #..." to see reports for current build, that was my impression when I try to open that link. Thank you
          Hide
          dlindner dlindner added a comment -

          Currently, the text "All crappy methods for" stands as a headline for the table
          underneath. The "#23"-link at the end points to the build result page. So if you
          had support for context paths or would use no context path, the link would just
          show "job/ABE/23/", which opens the build result overview.

          That's why i changed this issue to a RFE. Currently, there are two pages and one
          chart in the plugin:

          • The overview page accessible from the job page. Here you find the four charts
            and the table
          • The build result detail page. It's accessible from the build page
          • The "history of crappyness"-chart on the right side of the job page

          The plugin does not include the original HTML report yet. That's the topic of
          this issue. Can you describe what part of the report you want to see most? I've
          found the tables generated by crap4j rather useless.

          Show
          dlindner dlindner added a comment - Currently, the text "All crappy methods for" stands as a headline for the table underneath. The "#23"-link at the end points to the build result page. So if you had support for context paths or would use no context path, the link would just show "job/ABE/23/", which opens the build result overview. That's why i changed this issue to a RFE. Currently, there are two pages and one chart in the plugin: The overview page accessible from the job page. Here you find the four charts and the table The build result detail page. It's accessible from the build page The "history of crappyness"-chart on the right side of the job page The plugin does not include the original HTML report yet. That's the topic of this issue. Can you describe what part of the report you want to see most? I've found the tables generated by crap4j rather useless.
          Hide
          eagleigor eagleigor added a comment -

          Thank you for the detailed response.
          For me "All Crappy Methods for #..." is little bit misleading link. I can easily
          go back to the build result page using default Hudson top navigation bar. But
          when I click on the "All Crappy Methods for #..." I would expect more info about
          report, that is usual approach for all other Code Analyzes reports like PMD,
          FindBugs, Duplicate and etc.

          What do I like about default generated HTML pages? Well, I guess index(Summary)
          page with two graphs(images) for the "Percentage of CRAPpy Methods" and "Method
          CRAP Distribution". For me, more info we can add to the report is better.

          You could add extra text box on the config page to specify where HTML reports
          are located as an option. Right bellow "XML Crap Report filename pattern" text
          box. Something like "HTML Crap Results location".

          <hudson.plugins.crap4j.Crap4JPublisher>
          <reportPattern>abe/crap4j/report.xml</reportPattern>
          <reportHTML>abe/crap4j</reportHTML>
          <healthBuilder>
          <threshold>15.0</threshold>
          </healthBuilder>
          </hudson.plugins.crap4j.Crap4JPublisher>

          Thank you.

          Show
          eagleigor eagleigor added a comment - Thank you for the detailed response. For me "All Crappy Methods for #..." is little bit misleading link. I can easily go back to the build result page using default Hudson top navigation bar. But when I click on the "All Crappy Methods for #..." I would expect more info about report, that is usual approach for all other Code Analyzes reports like PMD, FindBugs, Duplicate and etc. What do I like about default generated HTML pages? Well, I guess index(Summary) page with two graphs(images) for the "Percentage of CRAPpy Methods" and "Method CRAP Distribution". For me, more info we can add to the report is better. You could add extra text box on the config page to specify where HTML reports are located as an option. Right bellow "XML Crap Report filename pattern" text box. Something like "HTML Crap Results location". <hudson.plugins.crap4j.Crap4JPublisher> <reportPattern>abe/crap4j/report.xml</reportPattern> <reportHTML>abe/crap4j</reportHTML> <healthBuilder> <threshold>15.0</threshold> </healthBuilder> </hudson.plugins.crap4j.Crap4JPublisher> Thank you.

            People

            • Assignee:
              dlindner dlindner
              Reporter:
              eagleigor eagleigor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: