diff --git a/NunitReportParser/Program.cs b/NunitReportParser/Program.cs index 571797619b9af6bc2114540ede9d86c84df6cc83..b8aecd62886d68f5767448e7a6ec24c4d1b27899 100644 --- a/NunitReportParser/Program.cs +++ b/NunitReportParser/Program.cs @@ -1,6 +1,7 @@ п»їusing System; using System.Collections.Generic; using System.IO; +using System.Runtime.CompilerServices; using System.Xml; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -79,16 +80,25 @@ namespace NunitReport static void Main(string[] args) { XmlDocument doc = new XmlDocument(); + string filePath; if (args.Length > 0) { basePath = args[0]; - doc.Load(basePath + @"/TestResult.xml"); + filePath = basePath + @"/TestResult.xml"; + } else { - doc.Load(@"./TestResult.xml"); + filePath = @"./TestResult.xml"; } - + doc.Load(filePath); + string[] XmlText = File.ReadAllLines(filePath); + System.Console.WriteLine("+++++++++++++++++++++++++"); + foreach (string line in XmlText) + { + System.Console.WriteLine(line); + } + System.Console.WriteLine("+++++++++++++++++++++++++"); // XmlNodeList nodes = doc.DocumentElement.SelectNodes("test-run/test-suite"); XmlNodeList nodes = doc.DocumentElement.ChildNodes;