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

SkipNoTestFiles flag ignored. Build still set to failed if test files missing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2003
    • Similar Issues:

      Description

      I have a parameterised build that allows me to skip the Unit Tests as required, but the build fails when this is used because:

      With the checkboxes:
      "Skip if there are no test files" checked
      "Fail the build if the results were not updated this run" unchecked
      I would expect the absence of the test files not to fail the build.

      BUILD SUCCESSFUL
      Total time: 16 minutes 34 seconds
      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing PHPUnit-3.x (default)
      [xUnit] [INFO] - [PHPUnit-3.x (default)] - No test report file(s) were found with the pattern 'build\*\report\*.xml' relative to 'C:\jenkins-node-workspace\workspace\Reports-Package' for the testing framework 'PHPUnit-3.x (default)'.  Did you enter a pattern relative to the correct directory?  Did you generate the result report(s) for 'PHPUnit-3.x (default)'?
      [xUnit] [WARNING] - No test reports found for the metric 'PHPUnit' with the resolved pattern 'build\*\report\*.xmlIgnore.
      [xUnit] [INFO] - Setting the build status to FAILURE
      [xUnit] [INFO] - Stopping recording.
      Build step 'Publish xUnit test result report' changed build result to FAILURE
      Archiving artifacts
      Sending e-mails to: xxx
      Finished: FAILURE
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mathieu Cantin
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/fbb835f47592f7271a0ea7e2f16bfe961a0bf652
          Log:
          Fix JENKINS-18443

          If we have 2 tests, A and B, both having the "Skip if there are no test
          files" checkbox checked and parser A has test files, but parser B
          doesn't. The result of parser A is ignored because parser B doesn't have
          any files.

          I see the reason of the line added for JENKINS-18443, but that just
          hides the real problem.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mathieu Cantin Path: src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/fbb835f47592f7271a0ea7e2f16bfe961a0bf652 Log: Fix JENKINS-18443 If we have 2 tests, A and B, both having the "Skip if there are no test files" checkbox checked and parser A has test files, but parser B doesn't. The result of parser A is ignored because parser B doesn't have any files. I see the reason of the line added for JENKINS-18443 , but that just hides the real problem.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/be6f3ecc808d03e0d57afbddf5aa0e9362ccc1a9
          Log:
          Merge pull request #20 from harcher81/master

          Fix JENKINS-18443

          Compare: https://github.com/jenkinsci/xunit-plugin/compare/68dda81eadd7...be6f3ecc808d

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/be6f3ecc808d03e0d57afbddf5aa0e9362ccc1a9 Log: Merge pull request #20 from harcher81/master Fix JENKINS-18443 Compare: https://github.com/jenkinsci/xunit-plugin/compare/68dda81eadd7...be6f3ecc808d
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jean-Jacques Lafay
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/bfbd152110312588b99d20a0f94305c8c07cd02c
          Log:
          Fix JENKINS-18443 when running on slaves

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jean-Jacques Lafay Path: src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/bfbd152110312588b99d20a0f94305c8c07cd02c Log: Fix JENKINS-18443 when running on slaves
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/531de4bb33d769c33d91a4547fc5322ca026f238
          Log:
          Merge pull request #21 from lanfeust69/master

          Fix JENKINS-18443 when running on slaves

          Compare: https://github.com/jenkinsci/xunit-plugin/compare/be6f3ecc808d...531de4bb33d7

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/531de4bb33d769c33d91a4547fc5322ca026f238 Log: Merge pull request #21 from lanfeust69/master Fix JENKINS-18443 when running on slaves Compare: https://github.com/jenkinsci/xunit-plugin/compare/be6f3ecc808d...531de4bb33d7
          Hide
          xredlinexx1 Eric Donovan added a comment - - edited

          Hi I'm seeing this issue on xUnit 1.95, on Jenkins 1.565.1. That is, the inabililty to save the option to skip if no report files are found.

          Show
          xredlinexx1 Eric Donovan added a comment - - edited Hi I'm seeing this issue on xUnit 1.95, on Jenkins 1.565.1. That is, the inabililty to save the option to skip if no report files are found.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              iainmackay85 Iain Mackay
            • Votes:
              4 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: