[JIRA] (JENKINS-57915) TestResult annotate function handling of URL's behaves differently than Jenkins core UrlConsoleAnnotator

3 views
Skip to first unread message

aray10@gmail.com (JIRA)

unread,
Jun 7, 2019, 5:35:02 PM6/7/19
to jenkinsc...@googlegroups.com
Aaron Ray created an issue
 
Jenkins / Bug JENKINS-57915
TestResult annotate function handling of URL's behaves differently than Jenkins core UrlConsoleAnnotator
Issue Type: Bug Bug
Assignee: Unassigned
Components: junit-plugin
Created: 2019-06-07 21:34
Environment: O/S: Windows 10 64-bit
JRE: 1.8.0_191
Jenkins: 2.164.3
JUnit Plugin: 1.28
Browser: Chrome 75.0.3770.80 64-bit
Running Jenkins directly as Windows service
Slaves are also running as Windows services
No proxies
Priority: Minor Minor
Reporter: Aaron Ray

This is arguably a feature request, but I opted to make it a bug due to divergence in behavior with Jenkins core.

The Jenkins UrlConsoleAnnotator ignores the closing bracket when translating URL's to hyperlinks from the raw text output of stdout:

https://github.com/jenkinsci/jenkins/blob/22aa2e6e766074d11249893e3f35e0b99e20d3d0/core/src/main/java/hudson/console/UrlAnnotator.java#L28

The JUnit plugin does not ignore this closing bracket:

https://github.com/jenkinsci/junit-plugin/blob/25f5a5cbfff16c0e6e2b30a8c5e8728a3b2b99d6/src/main/java/hudson/tasks/test/TestResult.java#L276

This only seems to cause problems when the link ending in a closing bracket is a filename. My use case is that we run Selenium test automation via Jenkins, and our framework outputs screenshots that are stored in the Jenkins workspace to stdout as URL's. We are wrapping the URL's in brackets (e.g. http://google.com).  This makes it easy to reference the screenshots from the console when troubleshooting. It is easier to look at the output via the testReport view provided by this plugin, but the link is then broken.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

aray10@gmail.com (JIRA)

unread,
Jun 7, 2019, 5:36:02 PM6/7/19
to jenkinsc...@googlegroups.com
Aaron Ray updated an issue
Change By: Aaron Ray
This is arguably a feature request, but I opted to make it a bug due to divergence in behavior with Jenkins core.

The Jenkins UrlConsoleAnnotator ignores the closing bracket when translating URL's to hyperlinks from the raw text output of stdout:

[https://github.com/jenkinsci/jenkins/blob/22aa2e6e766074d11249893e3f35e0b99e20d3d0/core/src/main/java/hudson/console/UrlAnnotator.java#L28]

The JUnit plugin does not ignore this closing bracket:

[https://github.com/jenkinsci/junit-plugin/blob/25f5a5cbfff16c0e6e2b30a8c5e8728a3b2b99d6/src/main/java/hudson/tasks/test/TestResult.java#L276]

This only seems to cause problems when the link ending in a closing bracket is a filename. My use case is that we run Selenium test automation via Jenkins, and our framework outputs screenshots that are stored in the Jenkins workspace to stdout as URL's. We are wrapping the URL's in brackets (e.g. \ [http://google.com \ ]).  This makes it easy to reference the screenshots from the console when troubleshooting. It is easier to look at the output via the testReport view provided by this plugin, but the link is then broken.
Reply all
Reply to author
Forward
0 new messages