Skip to content
Snippets Groups Projects
Commit fde01c90 authored by Anton Bagliy's avatar Anton Bagliy
Browse files

TRY: .,. #55

parent 782b2fc2
No related merge requests found
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Runtime.CompilerServices;
using System.Xml; using System.Xml;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
...@@ -79,16 +80,25 @@ namespace NunitReport ...@@ -79,16 +80,25 @@ namespace NunitReport
static void Main(string[] args) static void Main(string[] args)
{ {
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
string filePath;
if (args.Length > 0) if (args.Length > 0)
{ {
basePath = args[0]; basePath = args[0];
doc.Load(basePath + @"/TestResult.xml"); filePath = basePath + @"/TestResult.xml";
} }
else 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.SelectNodes("test-run/test-suite");
XmlNodeList nodes = doc.DocumentElement.ChildNodes; XmlNodeList nodes = doc.DocumentElement.ChildNodes;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment