Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2250

Surefire Test Report Schema properties element is not consistent with the code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.1
    • xml generation
    • None

    Description

      surefire-test-report.xsd defines:

      <xs:element name="properties" minOccurs="0" maxOccurs="unbounded">
      

      but the Java code says:

          private static void showProperties(XMLWriter xmlWriter, Map<String, String> systemProperties) throws IOException {
              xmlWriter.startElement("properties");
              for (final Entry<String, String> entry : systemProperties.entrySet()) {
                  final String key = entry.getKey();
                  String value = entry.getValue();
      
                  if (value == null) {
                      value = "null";
                  }
      
                  xmlWriter.startElement("property");
      
                  xmlWriter.addAttribute("name", key);
      
                  xmlWriter.addAttribute("value", extraEscapeAttribute(value));
      
                  xmlWriter.endElement();
              }
              xmlWriter.endElement();
          }
      

      and is called only once in org.apache.maven.plugin.surefire.report.StatelessXmlReporter.testSetCompleted(WrappedReportEntry, TestSetStats). This makes the schema definition wrong. Let's fix this.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              michael-o Michael Osipov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: