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

Jenkins doesn't display graph for test suites, before all tests successfully pass

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • junit-plugin
    • None

      When creating a new test suite, and the tests suite has always failed to pass, jenkins doesn't show a graph for the tests.
      Only when all the tests in the suite passed for the first time, a graph is displayed.
      The correct behavior, if I have 100 tests and 1 fails to pass, to display a graph with 99 "green" tests and one "red" test

          [JENKINS-31926] Jenkins doesn't display graph for test suites, before all tests successfully pass

          I made some experiments and for me it seems that the trend graph on the main page is not shown when:

          • Last build has a failed test
          • In the build history there is no consequently reachable build result with this test passed. By consequently reachable I mean that every build without Test results (i.e. failed on git checkout) stops the algorithm from traversing deeper.

          This is actually really annoying, especially for Jenkins Pipeline:
          In some cases when the build failed early (preparation or compilation phase) I don't want to run unit tests. I configure the script to avoid JUnit publishing in this case this always causes the trend not to be shown. The graph permalink that I embed on my wiki pages becomes unavailable too.

          My setup:

          • jenkins 1.639
          • Jenkins Workflow 1.12
          • JUnit plugin 1.10

          Nickolay Rumyantsev added a comment - I made some experiments and for me it seems that the trend graph on the main page is not shown when: Last build has a failed test In the build history there is no consequently reachable build result with this test passed. By consequently reachable I mean that every build without Test results (i.e. failed on git checkout) stops the algorithm from traversing deeper. This is actually really annoying, especially for Jenkins Pipeline: In some cases when the build failed early (preparation or compilation phase) I don't want to run unit tests. I configure the script to avoid JUnit publishing in this case this always causes the trend not to be shown. The graph permalink that I embed on my wiki pages becomes unavailable too. My setup: jenkins 1.639 Jenkins Workflow 1.12 JUnit plugin 1.10

          Udo Bellack added a comment -

          I think this may be related to https://issues.jenkins-ci.org/browse/JENKINS-40103 which addresses a missing "Test Result Trend" graph if all test were failing.

          We run Jenkins 2.235.1 LTS and JUnit plugin 1.31.

          As a workaround for our gradle tests we run them once with flag '-Dtest.ignoreFailures=true' and remove this flag afterwards, see https://stackoverflow.com/questions/24425354/gradle-ignorefailures-test-property

          Udo Bellack added a comment - I think this may be related to https://issues.jenkins-ci.org/browse/JENKINS-40103 which addresses a missing "Test Result Trend" graph if all test were failing. We run Jenkins 2.235.1 LTS and JUnit plugin 1.31. As a workaround for our gradle tests we run them once with flag '-Dtest.ignoreFailures=true' and remove this flag afterwards, see https://stackoverflow.com/questions/24425354/gradle-ignorefailures-test-property

          Edgars Batna added a comment - - edited

          For us it simply depends on build status itself. Test Result Trend does not appear unless there is at least one UNSTABLE or SUCCESS build. As soon as I delete all such builds, the chart disappears. If I create one, it appears again. I am so far unable to locate where this is implemented in either JUnit or echarts plugin. It seems that floatingBox.jelly is not loaded when there are no UNSTABLE or SUCCESS builds by the 'higher plugin' or Jenkins itself. Could someone point me at where this logic for loading floatingBox.jelly is?

          Edgars Batna added a comment - - edited For us it simply depends on build status itself. Test Result Trend does not appear unless there is at least one UNSTABLE or SUCCESS build. As soon as I delete all such builds, the chart disappears. If I create one, it appears again. I am so far unable to locate where this is implemented in either JUnit or echarts plugin. It seems that floatingBox.jelly is not loaded when there are no UNSTABLE or SUCCESS builds by the 'higher plugin' or Jenkins itself. Could someone point me at where this logic for loading floatingBox.jelly is?

            Unassigned Unassigned
            speller Shoham Peller
            Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: