public override void Flush(ReportAggregates reportAggregates) { base.Flush(reportAggregates); if (_viewStyle == ViewStyle.SPA) { var source = RazorEngineManager.Instance.Razor.RunCompile("SparkIndexSPA", typeof(ExtentHtmlReporter), this); File.WriteAllText(Path.Combine(FolderSavePath, "index.html"), source); } else { var source = RazorEngineManager.Instance.Razor.RunCompile("Index", typeof(ExtentHtmlReporter), this); File.WriteAllText(Path.Combine(FolderSavePath, "index.html"), source); source = RazorEngineManager.Instance.Razor.RunCompile("Dashboard", typeof(ExtentHtmlReporter), this); File.WriteAllText(Path.Combine(FolderSavePath, "dashboard.html"), source); if (CategoryContext.Context.Count > 0) { source = RazorEngineManager.Instance.Razor.RunCompile("Tag", typeof(ExtentHtmlReporter), this); File.WriteAllText(Path.Combine(FolderSavePath, "tag.html"), source); } if (ExceptionInfoContext.Context.Count > 0) { source = RazorEngineManager.Instance.Razor.RunCompile("Exception", typeof(ExtentHtmlReporter), this); File.WriteAllText(Path.Combine(FolderSavePath, "exception.html"), source); } } }
public override void Flush(ReportAggregates reportAggregates) { base.Flush(reportAggregates); var source = RazorEngineManager.Instance.Razor.RunCompile("V3Index", typeof(ExtentV3HtmlReporter), this); File.WriteAllText(SavePath, source); }
public override void Flush(ReportAggregates reportAggregates) { TestList = reportAggregates.TestList; StatusList = reportAggregates.StatusList; ReportStatusStats = reportAggregates.ReportStatusStats; AuthorContext = reportAggregates.AuthorContext; CategoryContext = reportAggregates.CategoryContext; DeviceContext = reportAggregates.DeviceContext; ExceptionInfoContext = reportAggregates.ExceptionInfoContext; SystemAttributeContext = reportAggregates.SystemAttributeContext; TestRunnerLogs = reportAggregates.TestRunnerLogs; EndTime = DateTime.Now; LoadUserConfig(); }
public override void Flush(ReportAggregates reportAggregates) { if (reportAggregates.TestList == null || reportAggregates.TestList.Count == 0) { return; } this._reportAggregates = reportAggregates; var filter = Builders <BsonDocument> .Filter.Eq("_id", ReportId); var update = Builders <BsonDocument> .Update .Set("endTime", DateTime.Now) .Set("duration", (DateTime.Now - _startTime).Milliseconds) .Set("status", StatusHierarchy.GetHighestStatus(reportAggregates.StatusList).ToString().ToLower()) .Set("parentLength", reportAggregates.ReportStatusStats.ParentCount) .Set("passParentLength", reportAggregates.ReportStatusStats.ParentCountPass) .Set("failParentLength", reportAggregates.ReportStatusStats.ParentCountFail) .Set("fatalParentLength", reportAggregates.ReportStatusStats.ParentCountFatal) .Set("errorParentLength", reportAggregates.ReportStatusStats.ParentCountError) .Set("warningParentLength", reportAggregates.ReportStatusStats.ParentCountWarning) .Set("skipParentLength", reportAggregates.ReportStatusStats.ParentCountSkip) .Set("exceptionsParentLength", reportAggregates.ReportStatusStats.ParentCountExceptions) .Set("childLength", reportAggregates.ReportStatusStats.ChildCount) .Set("passChildLength", reportAggregates.ReportStatusStats.ChildCountPass) .Set("failChildLength", reportAggregates.ReportStatusStats.ChildCountFail) .Set("fatalChildLength", reportAggregates.ReportStatusStats.ChildCountFatal) .Set("errorChildLength", reportAggregates.ReportStatusStats.ChildCountError) .Set("warningChildLength", reportAggregates.ReportStatusStats.ChildCountWarning) .Set("skipChildLength", reportAggregates.ReportStatusStats.ChildCountSkip) .Set("infoChildLength", reportAggregates.ReportStatusStats.ChildCountInfo) .Set("exceptionsChildLength", reportAggregates.ReportStatusStats.ChildCountExceptions) .Set("grandChildLength", reportAggregates.ReportStatusStats.GrandChildCount) .Set("passGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountPass) .Set("failGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountFail) .Set("fatalGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountFatal) .Set("errorGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountError) .Set("warningGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountWarning) .Set("skipGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountSkip) .Set("exceptionsGrandChildLength", reportAggregates.ReportStatusStats.GrandChildCountExceptions) .Set("analysisStrategy", AnalysisStrategy.ToString().ToUpper()); _reportCollection.UpdateOne(filter, update); InsertUpdateSystemAttribute(); }
public override void Flush(ReportAggregates reportAggregates) { base.Flush(reportAggregates); var source = RazorEngineManager.Instance.Razor.RunCompile("LoggerTest", typeof(ExtentLoggerReporter), this); File.WriteAllText(SavePath + "Index.html", source); source = RazorEngineManager.Instance.Razor.RunCompile("CommonsDashboard", typeof(ExtentLoggerReporter), this); File.WriteAllText(SavePath + "Dashboard.html", source); if (CategoryContext.Context.Count > 0) { source = RazorEngineManager.Instance.Razor.RunCompile("CommonsTag", typeof(ExtentLoggerReporter), this); File.WriteAllText(SavePath + "Tag.html", source); } if (ExceptionInfoContext.Context.Count > 0) { source = RazorEngineManager.Instance.Razor.RunCompile("CommonsException", typeof(ExtentLoggerReporter), this); File.WriteAllText(SavePath + "Exception.html", source); } }
public abstract void Flush(ReportAggregates reportAggregates);