public static void GenerateApiRunsStatsHtml(TestRunViewModel model) { var engine = new RazorLightEngineBuilder() .UseFileSystemProject(Program.TEMPLATE_FOLDER) .UseMemoryCachingProvider() .Build(); var viewModel = new ApiStatsViewModel() { BVVresults = model }; string result = engine.CompileRenderAsync("apiStats.cshtml", viewModel).Result; //Console.WriteLine(result); File.WriteAllText(Path.Combine(Program.WEB_REPORT_FOLDER, "apiStats.html"), result); }
public string TestRun(TestRunViewModel code) { return(code == null ? "Write some codeeeee" : codeManager.ExecuteOnFlyCode(code.TestRunCode)); }
private static void PrintApiTestTimes() { TestRunViewModel model = _collectorRepository.GetTestRun(TestRunType.API, FlytApplication.BVV, 11563); WebReportGenerator.GenerateApiRunsStatsHtml(model); }