-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.263.1
MSTest plugin 1.0.0
JUnit Plugin 1.48
ECharts API Plugin 4.9.0-2
When I click Build #2039 in the "Test Result Trend" chart at <https://SERVER/jenkins/job/REPO/job/master/>, the Web browser navigates to <https://SERVER/jenkins/job/REPO/job/master/2039/test/>, which immediately redirects to <https://SERVER/jenkins/job/REPO/job/master/2039/>. It should instead navigate to the "Test Result" page at <https://SERVER/jenkins/job/REPO/job/master/2039/testReport/>.
This might be fallout from the JENKINS-62096 ECharts migration. I don't think this is specific to the mstest plugin, because the build.xml file has a <hudson.tasks.junit.TestResultAction plugin="junit@1.48"> element that has neither "test" nor "testReport" in XML content or attributes.
At <https://SERVER/jenkins/job/REPO/job/master/test/>, the chart correctly links to <https://SERVER/jenkins/job/REPO/job/master/2039/testReport/>. This version of the trend chart however seems to use the deprecated TestResultProjectAction.doTrend method rather than ECharts.
Related source code:
- MSTestPublisher.getProjectAction creates an instance of TestResultProjectAction: MSTestPublisher.java in mstest-plugin
- TestResultProjectAction.getUrlName() returns "test": TestResultProjectAction.java in junit-plugin
- AbstractTestResultAction.getUrlName() returns "testReport": AbstractTestResultAction.java in junit-plugin
- it="${from}": TestResultProjectAction/floatingBox.jelly in junit-plugin
- tool="${it.urlName}": trend-chart.jelly in echarts-api-plugin
- renderTrendChart appends the value of the tool attribute to the URL: trend-chart.js in echarts-api-plugin
- is caused by
-
JENKINS-62096 Migrate History graph to ECharts
-
- Resolved
-
If I understand correctly, the problem is that ECharts API Plugin expects the getUrlName() methods of the per-job and per-build actions to return the same string, but the actions of JUnit Plugin return different strings:
URLs like <https://SERVER/jenkins/job/REPO/job/master/test/trend?> have been used for server-side rendering of the chart image but that feature is deprecated.
URLs like <https://SERVER/jenkins/job/REPO/job/master/2039/testReport/> are used for displaying per-build test results. I assume users expect these URLs to keep working.
There might be two ways to fix this problem:
This would change the URL of the deprecated non-ECharts trend chart.
There seems to be a type mismatch as well: trend-chart.jelly in echarts-api-plugin declares the "it" attribute as having type AsyncTrendJobAction (source, Javadoc), but TestResultProjectAction/floatingBox.jelly in junit-plugin instead provides TestResultProjectAction, which is not derived from AsyncTrendJobAction. Both implement AsyncTrendChart (source, Javadoc), though. I suppose there are two ways to fix this:
drulli, what do you think about the possible ECharts API Plugin changes in 1A and 2A?