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

No tooltips / image map generated on a graph when one of the previous builds failed before publishing TAP data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: tap-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.18
      tap-plugin 2.0
    • Similar Issues:

      Description

      When one of the builds in a history has failed before any TAP data was published, the graph displayed on a project page will then not contain image map and tooltips.

      To reproduce:

      • Create workflow job
      • Configure pipeline script as follows:

        node {
        stage "unit tests"
        sh"""#!/usr/bin/env bash
        SECONDS=`date "+%S"`
        MOD=\$((SECONDS % 2))

        if [[ \$MOD == 0 ]]; then

        cat > sample.tap <<EOF
        1..3
        ok 1 sample First ok
        ok 2 sample Second passed
        ok 3 sample This passed # SKIP error in test 2
        not ok 4 some failed test
        error message from test
        EOF
        else
        exit 1
        fi
        """
        step([
        $class : "TapPublisher",
        testResults : "**/sample.tap",
        failIfNoResults: false
        ])
        }

      • Run job for a few times until failed build encounters.
      • On a job page, you'll see the graph generated.
      • The tooltips and image (click) map is however missing.

        Attachments

          Activity

          Hide
          anenviousguest Vladislav Ponomarev added a comment -
          Show
          anenviousguest Vladislav Ponomarev added a comment - Suggested fix is part of https://github.com/jenkinsci/tap-plugin/pull/14
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vladislav Ponomarev
          Path:
          src/test/java/org/tap4j/plugin/util/GraphHelperTest.java
          src/test/resources/org/tap4j/plugin/util/GraphHelperTest.zip
          http://jenkins-ci.org/commit/tap-plugin/a9193230b3c285ee209531b4f6c2fd3cdbce944d
          Log:
          Red testcase for JENKINS-37623

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vladislav Ponomarev Path: src/test/java/org/tap4j/plugin/util/GraphHelperTest.java src/test/resources/org/tap4j/plugin/util/GraphHelperTest.zip http://jenkins-ci.org/commit/tap-plugin/a9193230b3c285ee209531b4f6c2fd3cdbce944d Log: Red testcase for JENKINS-37623
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vladislav Ponomarev
          Path:
          src/main/java/org/tap4j/plugin/TapProjectAction.java
          http://jenkins-ci.org/commit/tap-plugin/6cde4f7b2326e0a42c01cf29b1353b9036b1be30
          Log:
          [FIXED JENKINS-37623] Tolerate failed builds when generating tooltips.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vladislav Ponomarev Path: src/main/java/org/tap4j/plugin/TapProjectAction.java http://jenkins-ci.org/commit/tap-plugin/6cde4f7b2326e0a42c01cf29b1353b9036b1be30 Log: [FIXED JENKINS-37623] Tolerate failed builds when generating tooltips.
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Should be included in 2.1 release

          Show
          kinow Bruno P. Kinoshita added a comment - Should be included in 2.1 release

            People

            Assignee:
            kinow Bruno P. Kinoshita
            Reporter:
            anenviousguest Vladislav Ponomarev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: