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

Test URLs need to be escaped in "All Tests" view

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: Macintosh, OS: All
    • Similar Issues:

      Description

      When viewing "All Tests" and package root, I get URLs that are invalid due to the names of my tests.

      (I'm using Hudson to run Ruby tests, the test names are the Ruby name for the test controller -
      "Fnarg::FnooTester"

      The URL I see this issue at is: http://hudson.example.com/job/superapp/215/testReport/(root)/

      Any test with :: in the name shows up as links like:

      <a
      href="SuperApp::JiraVerifierTest/test_verify_email">SuperApp::JiraVerifierTest.test_verify_email</a>

      The browser misinterprets the SuperApp:: as a protocol in the URL; and sends me to the "page"
      "superApp::JiraVerifierTest/test_matching_email" (that's the complete URL). This doesn't work
      (obviously). It should have sent me to something like:

      http://hudson.example.com/job/superapp/215/testReport/(root)/SuperApp::JiraVerifierTest/test_matc
      hing_email/

      It is important to note that this only happens on some pages (listed above); other pages seem to
      construct the URL differently (perhaps with a path component first); and thus works for those pages.

        Attachments

          Activity

          Hide
          mindless Alan Harder added a comment -

          Working on this.

          Show
          mindless Alan Harder added a comment - Working on this.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/tasks/junit/CaseResult.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/junit/PackageResult.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TabulatedResult.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TestObject.java
          trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TestResult.java
          trunk/hudson/main/core/src/main/resources/hudson/tasks/junit/MetaTabulatedResult/body.jelly
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=14260
          Log:
          [FIXED JENKINS-1768] Handle unsafe URL characters for package/class names too.
          [FIXED JENKINS-2788] Add backslash as URL unsafe charcter (IE auto-replaces \ as /).
          Details:
          Add getSafeName (just does safe(getName())) in TabulatedResult.
          Use safe names as keys in maps for PackageResults/ClassResults, and use safe name
          when constructing links in jelly and in CaseResult.getRelativePathFrom().
          Add \ as character to replace in TestObject.safe().

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/tasks/junit/CaseResult.java trunk/hudson/main/core/src/main/java/hudson/tasks/junit/PackageResult.java trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TabulatedResult.java trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TestObject.java trunk/hudson/main/core/src/main/java/hudson/tasks/junit/TestResult.java trunk/hudson/main/core/src/main/resources/hudson/tasks/junit/MetaTabulatedResult/body.jelly trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=14260 Log: [FIXED JENKINS-1768] Handle unsafe URL characters for package/class names too. [FIXED JENKINS-2788] Add backslash as URL unsafe charcter (IE auto-replaces \ as /). Details: Add getSafeName (just does safe(getName())) in TabulatedResult. Use safe names as keys in maps for PackageResults/ClassResults, and use safe name when constructing links in jelly and in CaseResult.getRelativePathFrom(). Add \ as character to replace in TestObject.safe().
          Hide
          mindless Alan Harder added a comment -

          .

          Show
          mindless Alan Harder added a comment - .

            People

            Assignee:
            mindless Alan Harder
            Reporter:
            bwalding Ben Walding
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: