string jsonDumpFolder = @"c:\temp\Ginger\Dump\"; // !!!!!!!!!!!!!!!!!!!temp FIXME void GenerateReport(BusinessFlow businessFlow) // temp remove BF from param { string BusinessFlowReportFolder = jsonDumpFolder + "1 " + businessFlow.GetNameForFileName(); // !!!!!!!!!!!!!!!! temp remove ReportInfo RI = new ReportInfo(BusinessFlowReportFolder); //Ginger.Reports.GingerExecutionReport.ExtensionMethods.CreateGingerExecutionReport(RI); string templatesFolder = @"C:\Users\yaronwe\source\repos\Ginger\Ginger\Ginger\Reports\GingerExecutionReport\"; // !!!!!!!!!!!!!!!!!!!!!!! temp fix me HTMLReportConfiguration selectedHTMLReportConfiguration = HTMLReportConfiguration.SetHTMLReportConfigurationWithDefaultValues("DefaultTemplate", true); HTMLReportsConfiguration hTMLReportsConfiguration = new HTMLReportsConfiguration(); string hTMLOutputFolder = @"C:\Temp\Ginger\Report"; // !!!!!!!!!!!!!!!!!!!!!!! temp fix me Directory.Delete(hTMLOutputFolder, true); Directory.CreateDirectory(hTMLOutputFolder); string report = Ginger.Reports.GingerExecutionReport.ExtensionMethods.NewFunctionCreateGingerExecutionReport(RI, true, selectedHTMLReportConfiguration, templatesFolder: templatesFolder, hTMLReportsConfiguration: hTMLReportsConfiguration, hTMLOutputFolder: hTMLOutputFolder); //ExecutionLoggerConfiguration executionLoggerConfiguration = new ExecutionLoggerConfiguration(); //// HTMLReportsConfiguration currentConf = WorkSpace.UserProfile.Solution.HTMLReportsConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault(); ////get logger files //string exec_folder = @"c:\temp\hh"; // Ginger.Run.ExecutionLogger.GetLoggerDirectory(executionLoggerConfiguration.ExecutionLoggerConfigurationExecResultsFolder + "\\" + Ginger.Run.ExecutionLogger.defaultAutomationTabLogName);string templatesFolder = @"C:\Users\yaronwe\source\repos\Ginger\Ginger\Ginger\Reports\GingerExecutionReport\"; //string templatesFolder = @"C:\Users\yaronwe\source\repos\Ginger\Ginger\Ginger\Reports\GingerExecutionReport\"; ////create the report //HTMLReportConfiguration hTMLReportConfiguration = new HTMLReportConfiguration("DefaultTemplate", true); //string reportsResultFolder = Ginger.Reports.GingerExecutionReport.ExtensionMethods.NewFunctionCreateGingerExecutionReport(new ReportInfo(exec_folder), true, hTMLReportConfiguration, templatesFolder, false, 100000); //if (reportsResultFolder == string.Empty) //{ // Reporter.ToUser(eUserMsgKey.AutomationTabExecResultsNotExists); //} //else //{ // foreach (string txt_file in System.IO.Directory.GetFiles(reportsResultFolder)) // { // string fileName = Path.GetFileName(txt_file); // if (fileName.Contains(".html")) // { // System.Diagnostics.Process.Start(reportsResultFolder); // System.Diagnostics.Process.Start(reportsResultFolder + "\\" + fileName); // } // } //} }
public override void BusinessFlowStart(uint eventTime, BusinessFlow businessFlow, bool ContinueRun = false) { mBusinessFlowCounter++; mActivitiesCounter = 0; CurrentBusinessFlowFolder = Path.Combine(mDumpFolder, mBusinessFlowCounter + " " + businessFlow.GetNameForFileName()); Directory.CreateDirectory(CurrentBusinessFlowFolder); }