Details

    • Similar Issues:

      Description

      Currently the history graphs for test results are generated on the server side. This requires a non-headless jdk to be installed in order to work correctly (when using openjdk). This is an issue since installing the non-headless jdk contains a lot of unnecessary dependencies and X-11 components which are definitely not required on a server.

       

      My proposal is to migrate the graphs to the [ECharts API|https://plugins.jenkins.io/echarts-api/] as already used by the warnings-ng plugin.

      This would allow for a simpler server side code, allow access to the history data via an api and get rid of the X-11 dependencies that a non-headless jdk comes with.

      I'm planning to do the implementation but I'm happy to hear your thoughts on this topic and if a PR for this would make sense.

        Attachments

          Activity

          Hide
          davidgiga1993 David S added a comment -

          I've started to work on this topic now. If you want you can already take a look at it here:
          https://github.com/davidgiga1993/junit-plugin

           

          Show
          davidgiga1993 David S added a comment - I've started to work on this topic now. If you want you can already take a look at it here: https://github.com/davidgiga1993/junit-plugin  
          Hide
          timja Tim Jacomb added a comment -

          This has been done for the main trend graph:
          https://github.com/jenkinsci/junit-plugin/pull/134

          There's a few other graphs around that could do with it too

          Show
          timja Tim Jacomb added a comment - This has been done for the main trend graph: https://github.com/jenkinsci/junit-plugin/pull/134 There's a few other graphs around that could do with it too
          Hide
          gjanohp Guillermo Jano added a comment -

          I am observing two problems with the new Test Result Trend graph based on ECharts (which were not present with the previous, server-side-generated graphs):

           

          • The graph does not show in case there are duplicated labels among builds. The graph keeps loading forever and there is this stack trace being printed to the Jenkins log:
          2020-08-07 12:25:30.733+0000 [id=16816] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID bf2b67fe-daed-40c4-ba05-a1097921d2ed
          java.lang.IllegalStateException: Label already registered: Release 0.4.1
           at edu.hm.hafner.echarts.LinesDataSet.add(LinesDataSet.java:67)
           at edu.hm.hafner.echarts.LinesDataSet.add(LinesDataSet.java:90)
           at edu.hm.hafner.echarts.SeriesBuilder.createDataSetPerBuildNumber(SeriesBuilder.java:148)
           at edu.hm.hafner.echarts.SeriesBuilder.createDataSet(SeriesBuilder.java:82)
           at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:14)
           at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:111)
           at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:182)
           at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
           at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
           at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
           at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
           at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
           at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:637)
           at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
           at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
          • For some reason looks like for Maven projects the number of passed tests is always 0. Skipped and failed counts look fine though. However, for freestyle projects where the JUnit publisher is configured manually the passed count is fine as well:

           

          Show
          gjanohp Guillermo Jano added a comment - I am observing two problems with the new  Test Result Trend graph based on ECharts (which were not present with the previous, server-side-generated graphs):   The graph does not show in case there are duplicated labels among builds. The graph keeps loading forever and there is this stack trace being printed to the Jenkins log: 2020-08-07 12:25:30.733+0000 [id=16816] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID bf2b67fe-daed-40c4-ba05-a1097921d2ed java.lang.IllegalStateException: Label already registered: Release 0.4.1 at edu.hm.hafner.echarts.LinesDataSet.add(LinesDataSet.java:67) at edu.hm.hafner.echarts.LinesDataSet.add(LinesDataSet.java:90) at edu.hm.hafner.echarts.SeriesBuilder.createDataSetPerBuildNumber(SeriesBuilder.java:148) at edu.hm.hafner.echarts.SeriesBuilder.createDataSet(SeriesBuilder.java:82) at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:14) at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:111) at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:182) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:637) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) For some reason looks like for Maven projects the number of passed tests is always 0. Skipped and failed counts look fine though. However, for freestyle projects where the JUnit publisher is configured manually the passed count is fine as well:  
          Hide
          timja Tim Jacomb added a comment -

          Guillermo Jano

          Could you please raise new issues for each with clear reproduction steps.

          Thanks

          Show
          timja Tim Jacomb added a comment - Guillermo Jano Could you please raise new issues for each with clear reproduction steps. Thanks
          Show
          gjanohp Guillermo Jano added a comment - Done: https://issues.jenkins-ci.org/browse/JENKINS-63338 https://issues.jenkins-ci.org/browse/JENKINS-63339

            People

            • Assignee:
              davidgiga1993 David S
              Reporter:
              davidgiga1993 David S
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: