Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Invalid XML is produced #24

Open
dodikk opened this issue Oct 21, 2014 · 1 comment
Open

Invalid XML is produced #24

dodikk opened this issue Oct 21, 2014 · 1 comment

Comments

@dodikk
Copy link

dodikk commented Oct 21, 2014

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 ();
@alanmcgovern
Copy link
Contributor

Alternate fix proposed in this PR: #43

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants