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

Test results analyzer JavaScript error when clicked on show children image to expand tree

      Test results analyzer plugin does not expand its items on Jenkins 2.426 and later. When show children image (plus sign) is clicked, the child elements are not displayed and the below error is printed on browser console:

      When 
      testresult.js:140 Uncaught TypeError: $ is not a function
          at getDescendants (testresult.js:140:32)
          at toggleHandler (testresult.js:229:16)
          at HTMLSpanElement.<anonymous> (testresult.js:249:9)
          at HTMLSpanElement.dispatch (jquery-1.11.1.min.js:3:8436)
          at r.handle (jquery-1.11.1.min.js:3:5139)

      Tested with
      Chrome Version 119.0.6045.160.
      Jenkins Version 2.430
      Test Results Analyzer 0.4.0

          [JENKINS-72358] Test results analyzer JavaScript error when clicked on show children image to expand tree

          Mark Waite added a comment -

          Thanks for the report cem_polat. I was able to duplicate the issue that you've reported and I see that there are at least two related items in the JavaScript sources of the test results analyzer plugin.

          The test results analyzer plugin has a few usages of the Prototype.js JavaScript library but the Prototype.js JavaScript library was removed from Jenkins weekly 2.426 and Jenkins LTS 2.426.1. You can read more about it in the May 2023 blog post and the Oct 2023 blog post.

          Since the tests results analyzer plugin is up for adoption, that means it currently does not have a maintainer. Would you like to adopt the plugin and become a maintainer?

          Your first task would be to review my proposed pull request to see if it covers all the cases where you have seen the error.

          Mark Waite added a comment - Thanks for the report cem_polat . I was able to duplicate the issue that you've reported and I see that there are at least two related items in the JavaScript sources of the test results analyzer plugin. The test results analyzer plugin has a few usages of the Prototype.js JavaScript library but the Prototype.js JavaScript library was removed from Jenkins weekly 2.426 and Jenkins LTS 2.426.1. You can read more about it in the May 2023 blog post and the Oct 2023 blog post . Since the tests results analyzer plugin is up for adoption, that means it currently does not have a maintainer. Would you like to adopt the plugin and become a maintainer? Your first task would be to review my proposed pull request to see if it covers all the cases where you have seen the error.

          Mark Waite added a comment -

          I was able to duplicate the issue with the following steps:

          1. Create a plugins.txt that lists the plugins and versions needed
          2. Create a run-jenkins.sh script that downloads the plugins and Jenkins 2.430
          3. Run the run-jenkins.sh script
          4. Define job that generates a test output, as defined in generate-test-results-job-config.xml
          5. Run the job and confirm that test results are visible
          6. Open the developer web console on the browser
          7. Click the Test results analyzer link
          8. Click one of the plus sign images and confirm the web console reports the error message
          9. After fixing that error, confirm that clicking a checkbox in the expanded list shows a similar error message

          Mark Waite added a comment - I was able to duplicate the issue with the following steps: Create a plugins.txt that lists the plugins and versions needed Create a run-jenkins.sh script that downloads the plugins and Jenkins 2.430 Run the run-jenkins.sh script Define job that generates a test output, as defined in generate-test-results-job-config.xml Run the job and confirm that test results are visible Open the developer web console on the browser Click the Test results analyzer link Click one of the plus sign images and confirm the web console reports the error message After fixing that error, confirm that clicking a checkbox in the expanded list shows a similar error message

          cem added a comment -

          The updated script worked.

          cem added a comment - The updated script worked.

          Mark Waite added a comment -

          Thanks cem_polat. A pre-release build is available that includes the fix if others need it.

          Mark Waite added a comment - Thanks cem_polat . A pre-release build is available that includes the fix if others need it.

            markewaite Mark Waite
            cem_polat cem
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: