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

Inaccurate failure message for case where XML file exists, but contains no results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: nunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.619
    • Similar Issues:

      Description

      Summary:
      The NUnit plugin may state that no test result file was found if a file exists, but contains no results.

      Steps to reproduce

      1. Create a project, pointing it to a repository which has no tests.
      2. Configure the project to include executing Pester as a build step:
        powershell -noninteractive -Command "& 'Invoke-Command' -ScriptBlock {Import-Module Pester; Invoke-Pester -OutputFormat NUnitXml -OutputFile testresults.xml}" 
        
      3. Configure the project to publish NUnit results from testresults.xml.

      Expected Behavior:
      An error is received stating that an XML file was found, but there is no test data in the XML file.

      Actual Behavior:
      The following error is received:
      ERROR: Publisher 'Publish NUnit test result report' failed: No test report files were found. Configuration error?
      This error indicates that there was no XML file generated, which can lead the user on a wild goose chase if there is an XML file with no test data in the workspace.

        Attachments

          Issue Links

            Activity

            Hide
            slide_o_mix Alex Earl added a comment -

            I'm changing the error message to be:

             
            ERROR: Step ‘Publish NUnit test result report’ failed: No test report files were found or the NUnit input XML file contained no tests.

            Show
            slide_o_mix Alex Earl added a comment - I'm changing the error message to be:   ERROR: Step ‘Publish NUnit test result report’ failed: No test report files were found or the NUnit input XML file contained no tests.
            Hide
            slide_o_mix Alex Earl added a comment -

            Will be fixed in 0.22

            Show
            slide_o_mix Alex Earl added a comment - Will be fixed in 0.22

              People

              Assignee:
              slide_o_mix Alex Earl
              Reporter:
              bgshacklett Brian G. Shacklett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: