public static string GetQuickSummary(Test test) { string result; if (test.IsChildNode) { result = string.Empty; } else { string text = TestHtml.GetSourceQuickView(); LogCounts logCounts = new LogCounts().GetLogCounts(test); string[] flags = new string[] { UnifiedReportFlag.GetPlaceHolder("testName"), UnifiedReportFlag.GetPlaceHolder("testWarnings"), UnifiedReportFlag.GetPlaceHolder("currentTestPassedCount"), UnifiedReportFlag.GetPlaceHolder("currentTestFailedCount"), UnifiedReportFlag.GetPlaceHolder("currentTestFatalCount"), UnifiedReportFlag.GetPlaceHolder("currentTestErrorCount"), UnifiedReportFlag.GetPlaceHolder("currentTestWarningCount"), UnifiedReportFlag.GetPlaceHolder("currentTestInfoCount"), UnifiedReportFlag.GetPlaceHolder("currentTestSkippedCount"), UnifiedReportFlag.GetPlaceHolder("currentTestUnknownCount"), UnifiedReportFlag.GetPlaceHolder("currentTestRunStatus"), UnifiedReportFlag.GetPlaceHolder("currentTestRunStatusU") }; string[] values = new string[] { test.Name, TestHtml.GetWarningSource(test.InternalWarning), logCounts.Pass.ToString(), logCounts.Fail.ToString(), logCounts.Fatal.ToString(), logCounts.Error.ToString(), logCounts.Warning.ToString(), logCounts.Info.ToString(), logCounts.Skip.ToString(), logCounts.Unknown.ToString(), test.Status.ToString().ToLower(), test.Status.ToString().ToUpper() }; text = SourceBuilder.Build(text, flags, values); result = text; } return(result); }
public static string GetQuickSummary(Test test) { if (test.IsChildNode) { return(""); } string src = TestHtml.GetSourceQuickView(); var lc = new LogCounts().GetLogCounts(test); string[] flags = { ExtentFlag.GetPlaceHolder("testName"), ExtentFlag.GetPlaceHolder("testWarnings"), ExtentFlag.GetPlaceHolder("currentTestPassedCount"), ExtentFlag.GetPlaceHolder("currentTestFailedCount"), ExtentFlag.GetPlaceHolder("currentTestFatalCount"), ExtentFlag.GetPlaceHolder("currentTestErrorCount"), ExtentFlag.GetPlaceHolder("currentTestWarningCount"), ExtentFlag.GetPlaceHolder("currentTestInfoCount"), ExtentFlag.GetPlaceHolder("currentTestSkippedCount"), ExtentFlag.GetPlaceHolder("currentTestUnknownCount"), ExtentFlag.GetPlaceHolder("currentTestRunStatus"), ExtentFlag.GetPlaceHolder("currentTestRunStatusU") }; string[] values = { test.Name, TestHtml.GetWarningSource(test.InternalWarning), lc.Pass.ToString(), lc.Fail.ToString(), lc.Fatal.ToString(), lc.Error.ToString(), lc.Warning.ToString(), lc.Info.ToString(), lc.Skip.ToString(), lc.Unknown.ToString(), test.Status.ToString().ToLower(), test.Status.ToString().ToUpper() }; src = SourceBuilder.Build(src, flags, values); return(src); }