Esempio n. 1
0
        public static void Main(string[] args)
        {
            var config = NunitGoHelper.Configuration;
            var outputPath = config.LocalOutputPath;
            var attachmentsPath = outputPath + @"\Attachments\";

            PageGenerator.GenerateStyleFile(outputPath);

            var tests = NunitGoTestHelper.GetNewestTests(attachmentsPath).OrderBy(x => x.DateTimeFinish).ToList();
            var stats = new MainStatistics(tests);
            var statsChart = new MainInfoChart(stats, Output.GetStatsPieId());
            statsChart.SaveScript(outputPath);
            tests.GenerateTimelinePage(Path.Combine(outputPath, Output.Files.TimelineFile));
            stats.GenerateMainStatisticsPage(Path.Combine(outputPath, Output.Files.TestStatisticsFile));
            tests.GenerateTestListPage(Path.Combine(outputPath, Output.Files.TestListFile));
            tests.GenerateReportMainPage(outputPath, stats);
        }
Esempio n. 2
0
        public void GenerateReport()
        {
            try
            {
                if (!_configuration.GenerateReport) return;

                const string cssPageName = Output.Files.ReportStyleFile;
                var cssFullPath = Path.Combine(_outputPath, cssPageName);
                if (!File.Exists(cssFullPath))
                {
                    PageGenerator.GenerateStyleFile(cssFullPath);
                }

                var primerName = Output.Files.PrimerStyleFile;
                ExtractResource(primerName, _outputPath);

                var octiconsName = Output.Files.OcticonsStyleFiles;
                ExtractResources(octiconsName, _outputPath);

                //jquery - 1.11.0.min.js
                var jqueryName = Output.Files.JQueryScriptFile;
                ExtractResource(jqueryName, _outputPath);

                var tests = NunitGoTestHelper.GetNewestTests(_attachmentsPath).OrderBy(x => x.DateTimeFinish).ToList();
                var stats = new MainStatistics(tests);
                var statsChart = new MainInfoChart(stats, Output.GetStatsPieId());
                statsChart.SaveScript(_outputPath);
                tests.GenerateTimelinePage(Path.Combine(_outputPath, Output.Files.TimelineFile));
                stats.GenerateMainStatisticsPage(Path.Combine(_outputPath, Output.Files.TestStatisticsFile));
                tests.GenerateTestListPage(Path.Combine(_outputPath, Output.Files.TestListFile));
                tests.GenerateReportMainPage(_outputPath, stats);

            }
            catch (Exception ex)
            {
                Log.Exception(ex, "Exception in GenerateReport");
            }
        }