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

[junit] Un-inlining AbstractTestResultAction/summary.jelly

XMLWordPrintable

    • 1153.v1c24f1a_d2553

      Level easy
      Skills a bit of JavaScript, a bit of Jelly

      Culprit: AbstractTestResultAction/summary.jelly#L29-L39 and usage in AbstractTestResultAction/summary.jelly#L79

      Reproduction steps:

      • Install JUnit or clone https://github.com/jenkinsci/junit-plugin and then mvn hpi:run
      • Create a freestyle job
      • Add a post-build "Publish JUnit test result report"
      • Add "report.xml" as "Test report XMLs".
      • Save + run the job once
      • Then put in the workspace the content copy-pasted of report_multiple_failure.xml inside report.xml.
      • Run the job once.
      • From the build page, you will see the "Show all failed tests >>>"

      Screenshot attached about when the feature is displayed.

      Proposal

      • Move the showFailures method to an external file.
      • In the same external file, add a listener on the anchor onclick event. Be careful, the id "showLink" is perhaps too generic (could be present on other elements in the same page. Adding a className like "showFailuresLink" and using it as selector could be a good idea.
      • You can find such approach illustrated in https://github.com/jenkinsci/jenkins/pull/5786

      Testing notes

      • Ensure to reproduce the feature before any change
      • Ensure that you reproduce the feature after you have made the change

            aneveux Antoine Neveux
            wfollonier Wadeck Follonier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: