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

xUnit plugin does not read maven-surefire-plugin version 2.19 xml file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • xunit-plugin
    • None
    • Jenkins v1.638
      xUnit Plugin v1.98

      Hi,

      after an update to the new maven-surefire-plugin to version 2.19 the xUnit Plugin does not read the xml file anymore.

      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing JUnit
      [xUnit] [INFO] - [JUnit] - 12 test report file(s) were found with the pattern '/**/surefire-reports/TEST-*.xml' relative to 'D:\JenkinsSlave\workspace\JenkinsConfigurationTest' for the testing framework 'JUnit'.
      [xUnit] [ERROR] - The result file 'surefire-reports\TEST-de.JenkinsConfigurationTest.xml' for the metric 'JUnit' is not valid. The result file has been skipped.
      [xUnit] [INFO] - Failing BUILD because 'set build failed if errors' option is activated.
      [xUnit] [INFO] - There are errors when processing test results.
      [xUnit] [INFO] - Skipping tests recording.
      [xUnit] [INFO] - Stop build.
      

      The new surefire plugin adds two attributes to the testsuite element:

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd"

      Have a look at the attachment for a full example (an extended copy of the testcase1) and may add an simple testcase to the JUnitTypeTest.

          @Test
          public void testTestCase5() throws Exception {
              convertAndValidate(JUnitInputMetric.class, "junit/testcase5/input.xml", "junit/testcase5/input.xml");
          }
      

      This test fails.

      Thanks in advance and greetings from Berlin

            gbois Gregory Boissinot
            bernicc Bernard Ladenthin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: