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

JUnit Plugin fails if test report file (XML) is not in the workspace folder

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • junit-plugin
    • Jenkins ver. 2.190.2
      Windows 10
      JUnit Plugin 1.28

    Description

      In Pipeline jobs, the step to archive the JUnit-formatted test results fails if the files are not located in the workspace folder.

      The bug has been found when using JUnit plugin in a post stage block( {{post{ always

      { junit ...}

      }}} ). The stage is configured to run on an agent (slave, not in master) that runs windows. The master runs on a Linux.

      Example that fails (Bug):

      • Test Result XML is located in $WORKSPACE\test_report\report.xml
      • junit env.WORKSPACE+'\test_report\report.xml'
      • Output: No test report files were found. Configuration error?

      Example that works:

      • Test Result XML is located in $WORKSPACE\report.xml
      • junit 'report.xml'
      • Output: {{Recording test results }}(test results are successfully uploaded)

      Attachments

        Activity

          People

            Unassigned Unassigned
            albertosavila Alberto Sanchez
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: