private void InitializeXmlFile(XmlNode result) { ResultSummary summaryResults = new ResultSummary(result); xmlWriter.WriteStartDocument(false); xmlWriter.WriteComment("This file represents the results of running a test suite"); xmlWriter.WriteStartElement("test-results"); xmlWriter.WriteAttributeString("name", result.GetAttribute("fullname")); xmlWriter.WriteAttributeString("total", summaryResults.TestsRun.ToString()); xmlWriter.WriteAttributeString("errors", summaryResults.Errors.ToString()); xmlWriter.WriteAttributeString("failures", summaryResults.Failures.ToString()); xmlWriter.WriteAttributeString("not-run", summaryResults.TestsNotRun.ToString()); xmlWriter.WriteAttributeString("inconclusive", summaryResults.Inconclusive.ToString()); xmlWriter.WriteAttributeString("ignored", summaryResults.Ignored.ToString()); xmlWriter.WriteAttributeString("skipped", summaryResults.Skipped.ToString()); xmlWriter.WriteAttributeString("invalid", summaryResults.NotRunnable.ToString()); DateTime start = result.GetAttribute("start-time", DateTime.UtcNow); xmlWriter.WriteAttributeString("date", start.ToString("yyyy-MM-dd")); xmlWriter.WriteAttributeString("time", start.ToString("HH:mm:ss")); WriteEnvironment(); WriteCultureInfo(); }
public ResultReporter(XmlNode result, ConsoleOptions options) { this.result = result; this.testRunResult = result.GetAttribute("result"); this.options = options; this.summary = new ResultSummary(result); }
private void InitializeXmlFile(XmlNode result) { ResultSummary summaryResults = new ResultSummary(result); xmlWriter.WriteStartDocument(false); xmlWriter.WriteComment("This file represents the results of running a test suite"); xmlWriter.WriteStartElement("test-results"); xmlWriter.WriteAttributeString("name", result.GetAttribute("fullname")); xmlWriter.WriteAttributeString("total", summaryResults.ResultCount.ToString()); xmlWriter.WriteAttributeString("errors", summaryResults.Errors.ToString()); xmlWriter.WriteAttributeString("failures", summaryResults.Failures.ToString()); xmlWriter.WriteAttributeString("not-run", summaryResults.TestsNotRun.ToString()); xmlWriter.WriteAttributeString("inconclusive", summaryResults.Inconclusive.ToString()); xmlWriter.WriteAttributeString("ignored", summaryResults.Ignored.ToString()); xmlWriter.WriteAttributeString("skipped", summaryResults.Skipped.ToString()); xmlWriter.WriteAttributeString("invalid", summaryResults.NotRunnable.ToString()); DateTime start = result.GetAttribute("start-time", DateTime.UtcNow); xmlWriter.WriteAttributeString("date", start.ToString("yyyy-MM-dd")); xmlWriter.WriteAttributeString("time", start.ToString("HH:mm:ss")); WriteEnvironment(); WriteCultureInfo(); }
public ResultReporter(XmlNode result, ExtendedTextWriter writer, ConsoleOptions options) { _result = result; _writer = writer; _overallResult = result.GetAttribute("result"); if (_overallResult == "Skipped") _overallResult = "Warning"; _options = options; Summary = new ResultSummary(result); }
public ResultReporter(XmlNode resultNode, ExtendedTextWriter writer, ConsoleOptions options) { ResultNode = resultNode; Writer = writer; Options = options; OverallResult = resultNode.GetAttribute("result"); if (OverallResult == "Skipped") { OverallResult = "Warning"; } Summary = new ResultSummary(resultNode); }
public ResultReporter(XmlNode result, ExtendedTextWriter writer, ConsoleOptions options) { _result = result; _writer = writer; _overallResult = result.GetAttribute("result"); if (_overallResult == "Skipped") { _overallResult = "Warning"; } _options = options; Summary = new ResultSummary(result); }