Details

    • Similar Issues:

      Description

      From e-mail:

      """
      I've recently updated to the NUnit 3.x console runner, and it seems that the new version of NUnit runner inserts a BOM character at the strat of the XML output.
      (https://en.wikipedia.org/wiki/Byte_order_mark)

      This is breaking the NUnit plugin because the SAXParser doesn't like the BOM character at the start of the XML file.

      Here is a screenshot of the exception in Jenkins:
      Inline images 1

      I have attached an exmaple NUnit test result which contains the BOM character - it breaks the current plugin.

      If you view the XML using a hex viewer (e.g. NotePad++ with Hex plugin), you can see the offending character:
      Inline images 2

      A possible solution to fix this issue
      (with code stolen from here: http://www.rgagnon.com/javadetails/java-handle-utf8-file-with-bom.html)

      Add some kind of method to NUnitArchiver.java that checks for the BOM in the FileInputStream and removes it if found.

      I have attached an example solution.

      I know that GitHub is designed to allow for pull requests for strangers like me to fix the issues, but I ama C# guy, not a Java guy (and I don't know how to manipulate FileInputStream objects properly!)

      If you geta chance, pleae could you fix this issue

      Many thanks
      Kalen
      """

        Attachments

        1. buildlogs.txt
          6 kB
        2. image.png
          image.png
          193 kB
        3. image.png_3
          131 kB
        4. NUnitArchiver_with_suggested_fix.java
          4 kB
        5. TestResult.xml
          7 kB
        6. TestResults.with.BOM.character.xml
          19 kB

          Activity

          kinow Bruno P. Kinoshita created issue -
          kinow Bruno P. Kinoshita made changes -
          Field Original Value New Value
          Attachment TestResults.with.BOM.character.xml [ 32153 ]
          Attachment image.png_3 [ 32154 ]
          Attachment image.png [ 32155 ]
          Attachment NUnitArchiver_with_suggested_fix.java [ 32156 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 169422 ] JNJira + In-Review [ 183495 ]
          coldflu Cold Flu made changes -
          Attachment buildlogs.txt [ 37498 ]
          Attachment TestResult.xml [ 37499 ]
          slide_o_mix Alex Earl made changes -
          Assignee Bruno P. Kinoshita [ kinow ] Alex Earl [ slide_o_mix ]
          slide_o_mix Alex Earl made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              kinow Bruno P. Kinoshita
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: