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

"fail the build if no test results are present" option doesn't fail the job.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: tap-plugin
    • Labels:
      None
    • Environment:
      Jenkins: 1.551
      Tap: 1.18
    • Similar Issues:

      Description

      The "fail the build if no test results are present" option doesn't fail the job. The tap results file exists and contains a single string (not test results).

      TAP Reports Processing: START
      Looking for TAP results report in workspace using pattern: js_unittest_results.txt
      Saving reports...
      Processing '/var/lib/jenkins/jobs/testing/builds/2014-03-18_13-04-29/tap-master-files/js_unittest_results.txt'
      Parsing TAP test result [/var/lib/jenkins/jobs/testing/builds/2014-03-18_13-04-29/tap-master-files/js_unittest_results.txt].
      TAP Reports Processing: FINISH
      Finished: SUCCESS
      
      [bmannix@glados ~]$ cat /var/lib/jenkins/jobs/testing/builds/2014-03-18_13-04-29/tap-master-files/js_unittest_results.txt
      object
      

      EXPECTED BEHAVIOR:

      The build fails based on not finding any tap test results.

        Attachments

          Activity

          Hide
          kinow Bruno P. Kinoshita added a comment -

          >EXPECTED BEHAVIOR:
          >
          >The build fails based on not finding any tap test results.

          Righto. So I believe we need to update the documentation.

          This option only fails the build if no files are found, matching your glob pattern.

          If you configure your job to search for *.t files, and there are no files, and this option has been enabled, then your job will fail. If there any file, even if only several lines with comments, it won't fail the job, since it found a file matching the pattern.

          Show
          kinow Bruno P. Kinoshita added a comment - >EXPECTED BEHAVIOR: > >The build fails based on not finding any tap test results. Righto. So I believe we need to update the documentation. This option only fails the build if no files are found, matching your glob pattern. If you configure your job to search for *.t files, and there are no files, and this option has been enabled, then your job will fail. If there any file, even if only several lines with comments, it won't fail the job, since it found a file matching the pattern.
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Changed option text to "Fail the build if no test results (files) are found"

          Show
          kinow Bruno P. Kinoshita added a comment - Changed option text to "Fail the build if no test results (files) are found"
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Added a help file, with the following text:

          This option fails the build when no test results (files) are found. So if your job is
          configured to look for *.tap files, but when the plug-in looks at the workspace it
          cannot find any .tap file, and this option is checked, then your build will be marked
          as failure. If you have empty .tap, they still count, and the plug-in will not fail the build.

          Show
          kinow Bruno P. Kinoshita added a comment - Added a help file, with the following text: This option fails the build when no test results (files) are found. So if your job is configured to look for *.tap files, but when the plug-in looks at the workspace it cannot find any .tap file, and this option is checked, then your build will be marked as failure. If you have empty .tap, they still count, and the plug-in will not fail the build.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          src/main/resources/org/tap4j/plugin/TapPublisher/config.jelly
          src/main/webapp/help/TapPublisher/help-failIfNoResults.html
          http://jenkins-ci.org/commit/tap-plugin/1c2cc09213aa590503fdb45060fe9e6598f6e353
          Log:
          [FIXED JENKINS-22250] Added help file to clarify usafe of this feature

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/resources/org/tap4j/plugin/TapPublisher/config.jelly src/main/webapp/help/TapPublisher/help-failIfNoResults.html http://jenkins-ci.org/commit/tap-plugin/1c2cc09213aa590503fdb45060fe9e6598f6e353 Log: [FIXED JENKINS-22250] Added help file to clarify usafe of this feature
          Hide
          kinow Bruno P. Kinoshita added a comment -

          2.0.1 released

          Show
          kinow Bruno P. Kinoshita added a comment - 2.0.1 released

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              bmannix Brendan Mannix
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: