-
Bug
-
Resolution: Fixed
-
Minor
-
None
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
"""