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

Incorrect XML escape in <system-out> and <system-err> content of junit xml report

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.15, 2.16
    • Fix Version/s: 2.16
    • Component/s: xml generation
    • Labels:
      None
    • Flags:
      Patch

      Description

      JUnit XML report contains invalid XML characters in <system-out> and <system-err> content. The illegal characters handling defined in SUREFIRE-456 doesn't work since version 2.15. The problem is that EncodingOutputStream in StatelessXmlReporter does not convert the illegal XML characters to their string representation (e.g. 0 -> "0").

      Please find attached a possible fix for this issue as well as extended test case that includes illegal XML characters in system-out and system-err content.

        Attachments

        1. fixed-illegal-escape.patch
          3 kB
          Todor Todorov

          Issue Links

            Activity

              People

              • Assignee:
                agudian Andreas Gudian
                Reporter:
                todorst Todor Todorov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: