private void WriteTestSuite(string resultsName, ResultSummarizer summaryResults) { Dictionary <string, string> attributes = new Dictionary <string, string> { { "name", resultsName }, { "type", "Assembly" }, { "executed", "True" }, { "result", !summaryResults.success ? "Failure" : "Success" }, { "success", !summaryResults.success ? "False" : "True" }, { "time", summaryResults.duration.ToString("#####0.000", NumberFormatInfo.InvariantInfo) } }; this.WriteOpeningElement("test-suite", attributes); }
private void InitializeXmlFile(string resultsName, ResultSummarizer summaryResults) { this.WriteHeader(); DateTime now = DateTime.Now; Dictionary <string, string> attributes = new Dictionary <string, string> { { "name", "Unity Tests" }, { "total", summaryResults.TestsRun.ToString() }, { "errors", summaryResults.errors.ToString() }, { "failures", summaryResults.failures.ToString() }, { "not-run", summaryResults.testsNotRun.ToString() }, { "inconclusive", summaryResults.inconclusive.ToString() }, { "ignored", summaryResults.ignored.ToString() }, { "skipped", summaryResults.Skipped.ToString() }, { "invalid", summaryResults.notRunnable.ToString() }, { "date", now.ToString("yyyy-MM-dd") }, { "time", now.ToString("HH:mm:ss") } }; this.WriteOpeningElement("test-results", attributes); this.WriteEnvironment(this.m_Platform); this.WriteCultureInfo(); this.WriteTestSuite(resultsName, summaryResults); this.WriteOpeningElement("results"); }
private void InitializeXmlFile(string resultsName, ResultSummarizer summaryResults) { this.WriteHeader(); DateTime now = DateTime.Now; Dictionary<string, string> attributes = new Dictionary<string, string> { { "name", "Unity Tests" }, { "total", summaryResults.TestsRun.ToString() }, { "errors", summaryResults.errors.ToString() }, { "failures", summaryResults.failures.ToString() }, { "not-run", summaryResults.testsNotRun.ToString() }, { "inconclusive", summaryResults.inconclusive.ToString() }, { "ignored", summaryResults.ignored.ToString() }, { "skipped", summaryResults.Skipped.ToString() }, { "invalid", summaryResults.notRunnable.ToString() }, { "date", now.ToString("yyyy-MM-dd") }, { "time", now.ToString("HH:mm:ss") } }; this.WriteOpeningElement("test-results", attributes); this.WriteEnvironment(this.m_Platform); this.WriteCultureInfo(); this.WriteTestSuite(resultsName, summaryResults); this.WriteOpeningElement("results"); }
public void UpdateCounters(IEnumerable <TestResult> results) { ResultSummarizer summarizer = new ResultSummarizer(results); this.m_SucceededBtn = new GUIContent(summarizer.Passed.ToString(), Icons.s_SuccessImg, "Show tests that succeeded"); int num2 = (summarizer.errors + summarizer.failures) + summarizer.inconclusive; this.m_FailedBtn = new GUIContent(num2.ToString(), Icons.s_FailImg, "Show tests that failed"); int num3 = summarizer.ignored + summarizer.notRunnable; this.m_IgnoredBtn = new GUIContent(num3.ToString(), Icons.s_IgnoreImg, "Show tests that are ignored"); int num4 = (summarizer.testsNotRun - summarizer.ignored) - summarizer.notRunnable; this.m_NotRunBtn = new GUIContent(num4.ToString(), Icons.s_UnknownImg, "Show tests that didn't run"); }
public void UpdateCounters(IEnumerable<TestResult> results) { ResultSummarizer summarizer = new ResultSummarizer(results); this.m_SucceededBtn = new GUIContent(summarizer.Passed.ToString(), Icons.s_SuccessImg, "Show tests that succeeded"); int num2 = (summarizer.errors + summarizer.failures) + summarizer.inconclusive; this.m_FailedBtn = new GUIContent(num2.ToString(), Icons.s_FailImg, "Show tests that failed"); int num3 = summarizer.ignored + summarizer.notRunnable; this.m_IgnoredBtn = new GUIContent(num3.ToString(), Icons.s_IgnoreImg, "Show tests that are ignored"); int num4 = (summarizer.testsNotRun - summarizer.ignored) - summarizer.notRunnable; this.m_NotRunBtn = new GUIContent(num4.ToString(), Icons.s_UnknownImg, "Show tests that didn't run"); }
private void WriteTestSuite(string resultsName, ResultSummarizer summaryResults) { Dictionary<string, string> attributes = new Dictionary<string, string> { { "name", resultsName }, { "type", "Assembly" }, { "executed", "True" }, { "result", !summaryResults.success ? "Failure" : "Success" }, { "success", !summaryResults.success ? "False" : "True" }, { "time", summaryResults.duration.ToString("#####0.000", NumberFormatInfo.InvariantInfo) } }; this.WriteOpeningElement("test-suite", attributes); }