// TODO: remove the need for env - get it from notify event !!!!!! public ExecutionLoggerManager(Context context, eExecutedFrom executedFrom = eExecutedFrom.Run) { mContext = context; mJsonSerializer = new Newtonsoft.Json.JsonSerializer(); mJsonSerializer.NullValueHandling = NullValueHandling.Ignore; ExecutedFrom = executedFrom; if (WorkSpace.Instance != null && WorkSpace.Instance.Solution != null && WorkSpace.Instance.Solution.LoggerConfigurations.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB) { mExecutionLogger = new LiteDBRepository(); } else { mExecutionLogger = new TextFileRepository(); } executionLoggerHelper = new ExecutionLoggerHelper(); }
public void CreateGingerExecutionReportAutomaticly() { HTMLReportsConfiguration currentConf = WorkSpace.Instance.Solution.HTMLReportsConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault(); if ((mSelectedExecutionLoggerConfiguration.ExecutionLoggerConfigurationIsEnabled) && (Runners != null) && (Runners.Count > 0)) { if (mSelectedExecutionLoggerConfiguration.ExecutionLoggerHTMLReportsAutomaticProdIsEnabled) { string runSetReportName; if (!string.IsNullOrEmpty(RunSetConfig.Name)) { runSetReportName = RunSetConfig.Name; } else { runSetReportName = ExecutionLoggerManager.defaultRunTabLogName; } string exec_folder = new ExecutionLoggerHelper().GetLoggerDirectory(Path.Combine(mSelectedExecutionLoggerConfiguration.CalculatedLoggerFolder, runSetReportName + "_" + Runners[0].Executor.ExecutionLoggerManager.CurrentExecutionDateTime.ToString("MMddyyyy_HHmmssfff"))); } } }