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

Links to test results containing a hash (#) characters or a question mark (?) in their name

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-9M3263)
      Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

      Some of our tests include hashes in their name/label causing Jenkins troubles when it tries to produce a link to these tests:

      Let's take this test for instance:

      spec/controllers/categories_controller_spec.rb.CategoriesController with a simple category hierarchy#index when path is valid.assigns @products and @highlight

      Jenkins currently produces the following link:
      http://hudson_fqnd/job/job_name/123/testReport/spec_controllers_categories_controller_spec.rb/CategoriesController%20with%20a%20simple%20category%20hierarchy#index when path is valid/assigns_products_and_highlight/

      Which does not work since '#' is a special character in URIs is used to split the anchor (also called the URI reference) from the rest of the URI.

      A fix would be to automatically replace '#' in test names by the javascript code %23.

      Similarly for the question mark, which delimitates the query.
      The equivalent escape code is %3F.

      Ref. http://www.december.com/html/spec/esccodes.html

      I'm not a Java programmer myself unfortunately, but let me know if there is anything I can provide or do to help you with this issue.

          [JENKINS-10458] Links to test results containing a hash (#) characters or a question mark (?) in their name

          Gregory Becker created issue -
          Morgan Christiansson made changes -
          Link New: This issue is duplicated by JENKINS-10410 [ JENKINS-10410 ]
          kutzi made changes -
          Assignee New: kutzi [ kutzi ]
          kutzi made changes -
          Link New: This issue is duplicated by JENKINS-3359 [ JENKINS-3359 ]
          kutzi made changes -
          Resolution New: Incomplete [ 4 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Gregory Becker made changes -
          Attachment New: example_test_result.xml [ 21430 ]
          Gregory Becker made changes -
          Resolution Original: Incomplete [ 4 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          kutzi made changes -
          Status Original: Reopened [ 4 ] New: In Progress [ 3 ]
          kutzi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 140651 ] New: JNJira + In-Review [ 189172 ]

            kutzi kutzi
            gbws Gregory Becker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: