public static void GenerateMainStatisticsPage(this MainStatistics stats, string fullPath) { try { var reportMenuTitle = new SectionName("Main statistics"); var statisticsSection = new StatisticsSection(stats); var page = new HtmlPage("Main statistics page") { PageStylePaths = new List<string> { Output.Files.ReportStyleFile, Output.Files.PrimerStyleFile }, PageBodyCode = reportMenuTitle.HtmlCode + statisticsSection.HtmlCode }; page.SavePage(fullPath); } catch (Exception ex) { Log.Exception(ex, "Exception while generating main statistics page"); } }
public static void GenerateReportMainPage(this List<NunitGoTest> tests, string pathToSave, MainStatistics mainStats) { try { var menuElements = new List<ReportMenuItem> { new ReportMenuItem("Main statistics", Output.Files.TestStatisticsFile , "octicon octicon-graph"), new ReportMenuItem("Test list", Output.Files.TestListFile, "octicon octicon-checklist"), new ReportMenuItem("Timeline", Output.Files.TimelineFile, "octicon octicon-clock") }; var mainTitle = new SectionName("Test Run Report"); var mainInformation = new MainInformationSection(mainStats); var reportMenu = new MenuSection(menuElements, "main-menu", "Report menu"); var report = new HtmlPage("NUnitGo Report") { ScriptFilePaths = new List<string> { Output.Files.JQueryScriptFile, Output.Files.HighstockScriptFile, Output.Files.StatsScript }, PageStylePaths = new List<string> { Output.Files.ReportStyleFile, Output.Files.PrimerStyleFile, Output.Files.OcticonStyleFile }, PageBodyCode = mainTitle.HtmlCode + mainInformation.HtmlCode + reportMenu.ReportMenuHtml }; report.SavePage(Path.Combine(pathToSave, Output.Files.FullReportFile)); } catch (Exception ex) { Log.Exception(ex, "Exception while generating full report page"); } }
public static void GenerateTestListPage(this List<NunitGoTest> tests, string fullPath) { try { var reportMenuTitle = new SectionName("Test list"); var testListSection = new TestListSection(tests); var page = new HtmlPage("Test list page") { PageStylePaths = new List<string> { Output.Files.ReportStyleFile, Output.Files.PrimerStyleFile, Output.Files.OcticonStyleFile }, PageBodyCode = reportMenuTitle.HtmlCode + testListSection.HtmlCode }; page.SavePage(fullPath); } catch (Exception ex) { Log.Exception(ex, "Exception while generating test list page"); } }