Beispiel #1
0
        public static void InitializeReport()
        {
            ExtentReportReq     = Config["AppSettings:ExtentReport"];
            ArchiveReport       = Config["AppSettings:ArchiveExtentReport"];
            DeleteArchiveReport = Config["AppSettings:DeleteArchiveReport"];
            if (!string.IsNullOrEmpty(DeleteArchiveReport) && DeleteArchiveReport.Equals("Yes"))
            {
                ExtentReport.DeleteArchiveFolder(Config["AppSettings:ExtentReportArchiveFolderName"], Config["AppSettings:NumOfDaysToKeepArchiveReport"]);
            }

            if (!string.IsNullOrEmpty(ArchiveReport) && ArchiveReport.Equals("Yes"))
            {
                ExtentReport.ArchiveOldFolders(Config["AppSettings:ExtentReportFolderName"], Config["AppSettings:ExtentReportArchiveFolderName"], Config["AppSettings:NumOfDaysToKeepExtentReport"], Config["AppSettings:DeleteBeforeArchive"], Config["AppSettings:FileSizeToKeepExtentReport"]);
            }

            if (!string.IsNullOrEmpty(ExtentReportReq) && ExtentReportReq.Equals("Yes"))
            {
                extent = ExtentReport.InitReport(Config["AppSettings:ExtentReportFolderName"]);
            }
        }