[SUREFIRE-2250] Surefire Test Report Schema properties element is not consistent with the code (original) (raw)
- Type:
Bug
- Status: Closed
- Priority:
Major
- Resolution: Fixed
- Affects Version/s: 3.3.0
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.
depends upon
SUREFIRE-1360 Ability to disable properties for successfully passed tests
- Closed
links to