private void SetInvalidTestRunnerOutput() { Success = false; OverallResults = new Reporter.OverallResults(); ErrorMessage = $"Invalid test runner output.{Environment.NewLine}" + $"-------------------------------------------------------------------------------{Environment.NewLine}" + $"{_xmloutput}" + $"-------------------------------------------------------------------------------"; }
private void SetInvalidTestRunnerOutput() { Outcome = TestOutcomes.Failed; OverallResults = new Reporter.OverallResults(); ErrorMessage = $"Invalid test runner output.{Environment.NewLine}" + $"-------------------------------------------------------------------------------{Environment.NewLine}" + $"{_xmloutput}" + $"-------------------------------------------------------------------------------"; }
public Section(XmlNode node) { if (node.Name == Constants.NodeName_Section) { int line; if (int.TryParse(node.Attributes["line"]?.Value, out line)) { Line = line; } Name = node.Attributes["name"]?.Value; Filename = node.Attributes["filename"]?.Value; Children = new List <object>(); foreach (XmlNode child in node.ChildNodes) { switch (child.Name) { case Constants.NodeName_Exception: Children.Add(new Exception(child)); break; case Constants.NodeName_Expression: Children.Add(new Expression(child)); break; case Constants.NodeName_Failure: Children.Add(new Failure(child)); break; case Constants.NodeName_FatalErrorCondition: Children.Add(new FatalErrorCondition(child)); break; case Constants.NodeName_Info: Children.Add(new Info(child)); break; case Constants.NodeName_OverallResults: OverallResults = new OverallResults(child); break; case Constants.NodeName_Section: Children.Add(new Section(child)); break; case Constants.NodeName_Warning: Children.Add(new Warning(child)); break; default: break; } } } }
public TestResult(Reporter.TestCase testcase, Settings settings) { _settings = settings ?? new Settings(); _testcase = testcase; Duration = _testcase.OverallResult.Duration; Name = _testcase.Name; Outcome = _testcase.OverallResult.Success ? TestOutcomes.Passed : TestOutcomes.Failed; StandardOut = _testcase.OverallResult.StdOut; StandardError = _testcase.OverallResult.StdErr; OverallResults = new Reporter.OverallResults(); ExtractMessages(); GenerateMessages(); }
private void ExtractOverallResults(XmlNode nodeGroup) { var nodeOvRes = nodeGroup.SelectSingleNode("OverallResults"); OverallResults = new Reporter.OverallResults(nodeOvRes); }