Touch.Unit icon indicating copy to clipboard operation
Touch.Unit copied to clipboard

Invalid XML is produced

Open dodikk opened this issue 11 years ago • 1 comments

The file produced by the tool contains some non-xml information.

dodikk$ cat deployment/UnitTestReport.xml 
[Local Date/Time:   10/20/2014 4:49:58 PM]
[Remote Address:    10.38.11.5:51938]
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->

For this reason, the output cannot be used with Jenkins NUnit plug-in as is. Not sure why socket is preferred over Console.WriteLine

string header = String.Format ("[Local Date/Time:\t{1}]{0}[Remote Address:\t{2}]{0}", 
Environment.NewLine, DateTime.Now, remote);
byte[] array = Encoding.UTF8.GetBytes (header);
fs.Write (array, 0, array.Length);
fs.Flush ();

dodikk avatar Oct 21 '14 08:10 dodikk

Alternate fix proposed in this PR: https://github.com/spouliot/Touch.Unit/pull/43

alanmcgovern avatar Feb 27 '17 01:02 alanmcgovern