Exemplo n.º 1
0
 public void ReportingModule()
 {
     htmlReporter = new ExtentHtmlReporter(HTML_File_Path)
     {
         AppendExisting = true
     };
     htmlReporter.LoadConfig(Extent_File_Path);
     extent = new ExtentReports();
     extent.AttachReporter(htmlReporter);
 }
Exemplo n.º 2
0
        public void BeforeSuite()
        {
            var path         = Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName;
            var dir          = Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName + "\\Reports\\";
            var fileName     = this.GetType().ToString() + ".html";
            var htmlReporter = new ExtentHtmlReporter(dir + fileName);

            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
            htmlReporter.LoadConfig(Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName + "\\extent-config.xml");
        }
Exemplo n.º 3
0
        public static void InitializeAPIExtentReport()
        {
            var htmlReporter = new ExtentHtmlReporter(ConfigurationManager.AppSettings["extentReportPath"].ToString());

            htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
            htmlReporter.LoadConfig(ConfigurationManager.AppSettings["extentConfigPath"].ToString());
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
            extent.AddSystemInfo("Environment", "SIT1");
            extent.AddSystemInfo("Application", "Workspace Manager");
        }
        protected void Setup()
        {
            string pth          = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
            string actualPath   = pth.Substring(0, pth.LastIndexOf("bin"));
            string projectPath  = new Uri(actualPath).LocalPath;
            var    htmlReporter = new ExtentHtmlReporter(projectPath + "\\Reports\\Report.html");

            _extent = new ExtentReports();
            _extent.AttachReporter(htmlReporter);

            htmlReporter.LoadConfig(projectPath + "\\extent-config.xml");
        }
Exemplo n.º 5
0
        //Method to extend the reporting module
        protected void OneTimeSetup()
        {
            htmlReporter = new ExtentHtmlReporter(@"C:\Users\janani_jeeva\Documents\test1.html")
            {
                AppendExisting = true
            };
            htmlReporter.LoadConfig(@"C:\Users\janani_jeeva\source\repos\ReportBuilderTest\ReportBuilderTest\Extent-Config.xml");

            extent = new ExtentReports();

            extent.AttachReporter(htmlReporter);
        }
Exemplo n.º 6
0
        private void CreateReport(string fileName)
        {
            var htmlReporter = new ExtentHtmlReporter(Path.Combine(this.Settings.FolderUrl, "Report", fileName + ".html"));

            if (!string.IsNullOrEmpty(this.ConfigurationFilePath))
            {
                htmlReporter.LoadConfig(this.ConfigurationFilePath);
            }

            this.AddSystemInformation(this.Report);
            this.Report.AttachReporter(htmlReporter);
        }
Exemplo n.º 7
0
        protected void Setup()
        {
            var path         = Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName;
            var dir          = Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName + "\\Reports\\";
            var fileName     = this.GetType().ToString() + ".html";
            var htmlReporter = new ExtentHtmlReporter(dir + fileName);

            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
            htmlReporter.LoadConfig(Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName + "\\extent-config.xml");
            // allow automatic saving of media files relative to the report
        }
Exemplo n.º 8
0
        public static void InitializeReport()
        {
            //Driver >> Generate Driver Factory
            _driverFactory = new DriverFactory();

            //Extent Report >>Generate Extent Report structure 

            _extentHtmlReporter = new ExtentHtmlReporter(ConfigurationHelper.ExtentReportOutputPath);
            _extentHtmlReporter.LoadConfig(Path.Combine(ConfigurationHelper.ExtentReportOutputPath, "extent_config.xml"));
            extent = new ExtentReports();
            extent.AttachReporter(_extentHtmlReporter);
        }
 public static ExtentReports getInstance()
 {
     if (extent == null)
     {
         string reportFile = DateTime.Now.ToString().Replace("/", "_").Replace(":", "_").Replace(" ", "_") + ".html";
         htmlReporter = new ExtentHtmlReporter(@"C:\WeatherApp_APITesting\TestResults\" + "Report" + reportFile);
         extent       = new ExtentReports();
         extent.AttachReporter(htmlReporter);
         htmlReporter.LoadConfig(@"C:\WeatherApp_APITesting\WeatherAPITesting\extent-config.xml");
     }
     return(extent);
 }
Exemplo n.º 10
0
        private static ExtentHtmlReporter getHtmlReporter()
        {
            htmlReporter = new ExtentHtmlReporter(filePath);
            string path = ConfigurationManager.AppSettings["EtentConfig"];

            htmlReporter.LoadConfig(path);
            // make the charts visible on report open
            htmlReporter.Configuration().ChartVisibilityOnOpen = true;
            htmlReporter.Configuration().DocumentTitle         = "com.amaz - QAV automation report";
            htmlReporter.Configuration().ReportName            = "Regression cycle_1.1";
            return(htmlReporter);
        }
Exemplo n.º 11
0
        public static void InitializeReport()
        {
            DeleteContentfromDirectory();
            //To create report directory and add HTML report into it
            extent = new ExtentReports();
            var           dir          = AppDomain.CurrentDomain.BaseDirectory.Replace("\\bin\\Debug", "");
            DirectoryInfo di           = Directory.CreateDirectory(dir + "\\Reports");
            var           htmlReporter = new ExtentHtmlReporter(dir + "\\Reports" + "\\Automation Report" + ".html");

            htmlReporter.LoadConfig(dir + "\\extent-config.xml");
            extent.AttachReporter(htmlReporter);
        }
Exemplo n.º 12
0
        public static void StartReporter()
        {
            //TheLogger.Trace("Starting a one time setup for the entire" +
            //" .SHTests." +
            //"Going to initialize the reporter next...");
            CreateReportDirectory();
            var htmlReporter = new ExtentHtmlReporter(HtmlReportFullPath);

            htmlReporter.LoadConfig(htmlConfig);
            ReportManager = new ExtentReports();
            ReportManager.AttachReporter(htmlReporter);
        }
Exemplo n.º 13
0
        public static void Generate_Report()
        {
            UserDir = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName;

            htmlReporter = new ExtentHtmlReporter(UserDir + "\\Reports\\Automation_Report_" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".html");

            htmlReporter.LoadConfig(UserDir + "\\extent-config.xml");

            htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
        /// <summary>
        /// Initializes the reporter and logs the test result for a given test suite.
        /// </summary>
        /// <param name="suiteName"> Name of the test suite for which test results has to be logged.</param>
        public void InitializeReport()
        {
            try
            {
                string ReporterTheme = ConfigurationManager.AppSettings["ReporterTheme"];
                string ReportTitle   = ConfigurationManager.AppSettings["ReportTitle"];
                string ReportName    = ConfigurationManager.AppSettings["ReportName"];

                WorkSpace        = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                ProjectDirectory = Environment.GetEnvironmentVariable("RUN_FROM_CMD") == "TRUE" ? Path.GetFullPath(Path.Combine(WorkSpace, @"../../../../")) : Path.GetFullPath(Path.Combine(WorkSpace, @"../../../"));
                ProjectPath      = AppDomain.CurrentDomain.BaseDirectory.Split(new string[] { "\\bin\\" }, StringSplitOptions.None)[0] + "\\";

                string reportName      = "\\TestResultReport_" + DateTime.Now.ToString("MM_dd_yyyy_HH_mm_ss_fff") + ".html";
                string reportDirectory = Path.Combine(ProjectPath + "\\ExtentReports");
                if (!Directory.Exists(reportDirectory))
                {
                    Directory.CreateDirectory(reportDirectory);
                }
                string   reportPath     = Path.Combine(reportDirectory + reportName);
                string   configFilePath = Path.Combine(reportDirectory + "\\ExtentReportConfig.xml");
                Assembly assembly       = typeof(Demo.Automation.Framework.ExtentReport).Assembly;

                using (Stream configFileStream = assembly.GetManifestResourceStream("Demo.Automation.Framework.Reports.Config.ExtentReportConfig.xml"))
                {
                    XmlDocument xmlDocument = new XmlDocument();
                    xmlDocument.Load(configFileStream);

                    if (!ReporterTheme.Equals(string.Empty))
                    {
                        xmlDocument.GetElementsByTagName("theme").Item(0).InnerText = ReporterTheme;
                    }
                    if (!ReportTitle.Equals(string.Empty))
                    {
                        xmlDocument.GetElementsByTagName("documentTitle").Item(0).InnerText = ReportTitle;
                    }
                    if (!ReportName.Equals(string.Empty))
                    {
                        xmlDocument.GetElementsByTagName("reportName").Item(0).InnerText = ReportName;
                    }
                    xmlDocument.Save(configFilePath);
                }

                var htmlReporter = new ExtentHtmlReporter(reportPath);
                htmlReporter.LoadConfig(configFilePath);
                _extent = new ExtentReports();
                _extent.AttachReporter(htmlReporter);
            }
            catch (Exception e)
            {
                CustomExceptionHandler.CustomException(e);
            }
        }
Exemplo n.º 15
0
        protected TestFixture()
        {
            CleanUpAllDriver();
            BaseDriver.StartBrowser(BrowserType.Chrome);

            // Create the folder report
            DateTime now          = DateTime.Now;
            var      dirReport    = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Report " + now.ToString("ddd dd-MMM-yyyy HH-mm-ss/");
            var      htmlReporter = new ExtentHtmlReporter(dirReport);

            htmlReporter.LoadConfig(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\extent-config.xml");
            BaseValues.ExtentReports.AttachReporter(htmlReporter);
        }
Exemplo n.º 16
0
        //[OneTimeSetUp]
        public static ExtentReports ReportSetup()
        {
            var dir          = new Uri(Environment.CurrentDirectory.ToString() + @"\..\..\").LocalPath.ToString() + "Results\\";
            var fileName     = "KYC_Result_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".html";
            var htmlReporter = new ExtentHtmlReporter(dir + fileName);

            htmlReporter.LoadConfig(new Uri(Environment.CurrentDirectory.ToString() + @"\..\..\").LocalPath.ToString() + "extent-config.xml");

            _extent = new ExtentReports();
            _extent.AttachReporter(htmlReporter);

            return(_extent);
        }
        public static void Setup()
        {
            var dir          = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..")) + "\\";
            var fileName     = UtilitySetup.ReportName;
            var htmlReporter = new ExtentHtmlReporter(dir + fileName);

            htmlReporter.LoadConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "extent-config.xml"));
            _extent = new ExtentReports();
            _extent.AttachReporter(htmlReporter);
            driver = new ChromeDriver();
            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl(UtilitySetup.BaseURL);
        }
Exemplo n.º 18
0
        public static ExtentReports GetInstance()
        {
            if (extentReoprts == null)
            {
                htmlReporter  = new ExtentHtmlReporter(GeneralActions.GetReportFolderPath());
                extentReoprts = new ExtentReports();
                extentReoprts.AttachReporter(htmlReporter);
                extentReoprts.AddSystemInfo("OS", "Windows");

                htmlReporter.LoadConfig(GeneralActions.GetExtentConfigPath());
            }
            return(extentReoprts);
        }
Exemplo n.º 19
0
 private static ExtentReports getInstance()
 {
     htmlReporter = new ExtentHtmlReporter(@"G:\htmlFile.html");
     htmlReporter.LoadConfig(@"C:\Users\ABC\source\repos\SeleniumNUnitTest\NUnit.Tests1\Extent\extent-config.xml");
     htmlReporter.Configuration().Theme         = Theme.Dark;
     htmlReporter.Configuration().DocumentTitle = "ArrowReport";
     htmlReporter.Configuration().ReportName    = "ArrowReport";
     extentReports = new ExtentReports();
     extentReports.AttachReporter(htmlReporter);
     extentReports.AddSystemInfo("OS_NAME", "Windows 10");
     extentReports.AddSystemInfo("HostMachine", "Local Machine");
     return(extentReports);
 }
Exemplo n.º 20
0
        public static void BeforeFeature()
        {
            extent.AddSystemInfo("URL", "test-salesdash.thomaspublishing.com");
            extent.AddSystemInfo("Username", "Ankit Kansal");
            //htmlReporter.LoadConfig(@"E:\Sample\ThomasPublishing\ThomasProject\ThomasProject\ThomasNetProject\ThomasNetProject\extent-config.xml");

            htmlReporter.LoadConfig(@"C:\Users\Anuruddha.Tiwari\source\repos\ThomasNetProject\ThomasNetProject\extent-config.xml");
            SelectBrowser.BrowserandURL(ConfigurationManager.AppSettings.Get("Website"), ConfigurationManager.AppSettings.Get("Browser"));
            //ExcelRead.xlPath = ConfigurationManager.AppSettings.Get("FilePath");
            ScreenshotPage.Path = ConfigurationManager.AppSettings.Get("PathofScreenshot");
            Loghelper.appender  = ConfigurationManager.AppSettings.Get("Appender");
            extent.AttachReporter(htmlReporter);
            //test = extent.CreateTest(FeatureContext.Current.FeatureInfo.Title);
        }
Exemplo n.º 21
0
        public void StartTest()
        {   //Initialising extent report
            htmlReports = new ExtentHtmlReporter(ReportPath + "ExecutionReport" + DateTime.Now.ToString("_dd-mm-yyyy_mss") + ".html");
            extent      = new ExtentReports();
            htmlReports.Configuration().Theme = Theme.Standard;
            htmlReports.LoadConfig(KeysResource.ExtentReportConfig);
            extent.AttachReporter(htmlReports);
            test = extent.CreateTest("Keys-Property Tests");
            //Login
            CommonMethods.LaunchBrowser(BrowserName);
            LoginPO LO = new LoginPO();

            LO.Login();
        }
Exemplo n.º 22
0
        public static void StartReport()
        {
            string path        = Assembly.GetCallingAssembly().CodeBase;
            string actualpath  = path.Substring(0, path.LastIndexOf("bin"));
            string projectpath = new Uri(actualpath).LocalPath;
            string reportpath  = projectpath + "Reports\\TestReport.html";

            extentHtmlReporter = new ExtentHtmlReporter(reportpath);
            extentHtmlReporter.LoadConfig(projectpath + "extent-config.xml");
            extentHtmlReporter.AppendExisting = false;
            extentReport = new ExtentReports();
            extentReport.AttachReporter(extentHtmlReporter);
            extentReport.AddSystemInfo("Host name", "Ramya Prabhakar");
            extentReport.AddSystemInfo("Environment", "QA Test");
        }
Exemplo n.º 23
0
        public void StartReport()
        {
            string path        = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
            string actualPath  = path.Substring(0, path.LastIndexOf("bin"));
            string projectPath = new Uri(actualPath).LocalPath;
            //Report location
            string reportpath = projectPath + "Reports\\test.html";
            var    extentHtml = new ExtentHtmlReporter(reportpath);

            extentHtml.LoadConfig(projectPath + "extent-config.xml");
            extent = new ExtentReports();
            extent.AttachReporter(extentHtml);
            extent.AddSystemInfo("Host name", "Nalat");
            extent.AddSystemInfo("Environment", "QA");
            extent.AddSystemInfo("User name", "Nalat");
        }
Exemplo n.º 24
0
        protected void Setup()
        {
            dir      = TestContext.CurrentContext.TestDirectory + "\\";
            config   = dir + "..\\..\\";
            fileName = "ComparativeTestsReport.html";


            if (initialized == false)
            {
                htmlReporter = new ExtentHtmlReporter(dir + fileName);
                htmlReporter.LoadConfig(config + "extent-config.xml");
                _extent = new ExtentReports();
                _extent.AttachReporter(htmlReporter);
                initialized = true;
            }
        }
        public void Init()
        {
            //system info
            string          hostname = Dns.GetHostName();
            OperatingSystem os       = Environment.OSVersion;

            extent.AddSystemInfo("Operating system: ", os.ToString());
            extent.AddSystemInfo("Host: ", hostname);
            extent.AddSystemInfo("Browser: ", "Google Chrome");

            extent.AttachReporter(HtmlReporter);
            HtmlReporter.LoadConfig(@"..\..\extent-config.xml");
            HtmlReporter.Configuration().JS = "$('.test.warning').each(function() { $(this).addClass('pass').removeClass('warning'); }); $('.test-status.warning').each(function() { $(this).addClass('pass').removeClass('warning').text('pass'); });$('.tests-quick-view .status.warning').each(function() { $(this).addClass('pass').removeClass('warning').text('PASS'); }); testSetChart();";

            WebDriver.Initialize();
        }
Exemplo n.º 26
0
        public static void InitializeReport()
        {
            //Initialize Extent report before test starts
            var htmlReporter = new ExtentHtmlReporter(new AutomationUtilities().GetAutomationReportsFolder() + @"\AtmosphereDashboard_" + System.DateTime.Today.ToString("dd-MM-yyyy") + ".html");

            //Attach report to reporter
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);

            extent.AddSystemInfo("OS", "Windows");
            extent.AddSystemInfo("Host Name", "CI");
            extent.AddSystemInfo("Environment", "One Atmos QA");
            extent.AddSystemInfo("User Name", "Sravani Lakshmi");

            htmlReporter.LoadConfig(new AutomationUtilities().GetProjectLocation() + @"\extent-config.xml");
        }
Exemplo n.º 27
0
        public static void BeforeTestRun()
        {
            projectdirectory = $@"{Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\"))}";
            string reportDirectory = @"C:\Automation\Results\Report\";

            if (!Directory.Exists(reportDirectory))
            {
                Directory.CreateDirectory(reportDirectory);
            }
            string reportPath   = $"{reportDirectory}{DateTime.Now.ToString("yyyyMMddHHmmss")}.html";
            var    htmlReporter = new ExtentHtmlReporter(reportPath);

            htmlReporter.LoadConfig($"{projectdirectory}extent-config.xml");
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
        static ReportsHelper()
        {
            DateTime timeStamp = DateTime.Now;
            string   timeNow   = timeStamp.ToString("yyyyMMddHHmmss");

            extent = new ExtentReports();
            var           dir = AppDomain.CurrentDomain.BaseDirectory.Replace("\\bin\\Debug", "");
            DirectoryInfo di  = Directory.CreateDirectory(dir + "\\TestExecutionReports\\" +
                                                          "");
            var htmlReporter = new ExtentHtmlReporter(dir + "\\TestExecutionReports" + "\\" + testName + " " + timeNow + ".html");

            extent.AddSystemInfo("Environment", "Carescript Test Automation");
            extent.AddSystemInfo("User Name", "Aldrin Sy");
            extent.AttachReporter(htmlReporter);
            htmlReporter.LoadConfig(dir + "\\extent-config.xml");
        }
Exemplo n.º 29
0
        public static void InitializeReport()
        {
            string projectPath = @"C:\Users\u65557\Documents\Visual Studio 2015\Projects\BDDFramework\ConsoleApplication2";

            //Append the html report file to current project path
            string reportPath = projectPath + "\\TestRunReport.html";

            //Initialize Extent report before test starts
            var htmlReporter = new ExtentHtmlReporter(reportPath);

            //htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            htmlReporter.LoadConfig(projectPath + "\\extent-config.xml");
            //Attach report to reporter
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
Exemplo n.º 30
0
        public static void InitializeReport()
        {
            string repoTime = DateTime.Now.ToString("yyyyMMdd_HHmmss");

            //Append the html report file to current project path
            string reportPath = dirPath + "\\Reports\\TestRunReport\\" + repoTime + ".html";

            //Initialize Extent report before test starts
            var htmlReporter = new ExtentHtmlReporter(reportPath);

            //htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            htmlReporter.LoadConfig(dirPath + "\\extent-config.xml");

            //Attach report to reporter
            extent = new ExtentReports();
            extent.AttachReporter(htmlReporter);
        }