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

Links to failed tests need to be URL encoded


      Steps to reproduce:
      1. Have a jenkins job with IM plugin enabled to send notifications (with Jabber in our case)
      2. Set up a test that fails which contains a space in the name
      3. Run test and Jenkins IM plugin will send the notification

      Expected result:
      3. Correct link to the failed test

      Actual result:
      3. Link to the test is incorrect, since it contains non url-encoded characters.

      In the example in the screenshot you can see that the Jabber client automatically creates a link to the test, but fails at the first space (after "Price" in "Price type rules").

      Possible solution:
      I have identified where in the code the URL is built:

      • MessageHelper.getTestUrl() for building the url to the failing test
      • MessageHelper.getBuildURL() for building the base link (and the link to the build)


      It seems that there is some encoding done in getBuildURL() but not in getTestUrl()?

      And here's where it is used to build the full string sent:

            kutzi kutzi
            mpv Victor Sollerhed
            0 Vote for this issue
            3 Start watching this issue