예제 #1
0
 public void BeforeClass()
 {
     try
     {
         //To create report directory and add HTML report into it
         _extent = new AventStack.ExtentReports.ExtentReports();
         if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
         {
             var           dir          = AppDomain.CurrentDomain.BaseDirectory.Replace("\\bin\\Debug\\netcoreapp3.1", "");
             DirectoryInfo di           = Directory.CreateDirectory(dir + "\\Test_Execution_Reports");
             var           htmlReporter = new ExtentHtmlReporter(dir + "\\Test_Execution_Reports" + "\\Automation_Report" + ".html");
             _extent.AddSystemInfo("Environment", "TradeMe Sandbox API");
             _extent.AddSystemInfo("User Name", "Evan Wood");
             _extent.AttachReporter(htmlReporter);
         }
         else
         {
             var           dir          = AppDomain.CurrentDomain.BaseDirectory.Replace("/bin/Debug/netcoreapp3.1", "");
             DirectoryInfo di           = Directory.CreateDirectory(dir + "/Test_Execution_Reports");
             var           htmlReporter = new ExtentHtmlReporter(dir + "/Test_Execution_Reports" + "/Automation_Report" + ".html");
             _extent.AddSystemInfo("Environment", "TradeMe Sandbox API");
             _extent.AddSystemInfo("User Name", "Evan Wood");
             _extent.AttachReporter(htmlReporter);
         }
     }
     catch (Exception e)
     {
         throw (e);
     }
 }
예제 #2
0
    public void ExtentStart()
    {
        extent = new AventStack.ExtentReports.ExtentReports();
        var htmlReporter = new ExtentHtmlReporter("/Users/usamarashid/Desktop/AssimaDemo/MyReport.html");

        extent.AttachReporter(htmlReporter);
    }
예제 #3
0
        public AventStack.ExtentReports.ExtentReports getReport()
        {
            string reportPath = ReportingHelpers.reportpath();
            string timeNow    = DateTime.Now.ToLongTimeString().ToString().Replace(':', '_');

            //initialize the reportsetup
            htmlreportPath = reportPath + @"\" + "RunResult_" + timeNow + ".html";

            Logger.log("HTML Report Path" + htmlreportPath);
            var htmlReporter = new ExtentV3HtmlReporter(htmlreportPath);

            var extent = new AventStack.ExtentReports.ExtentReports();

            extent.AttachReporter(htmlReporter);
            // adding environment variables

            string machineName = Environment.MachineName;
            string systemOS    = Environment.OSVersion.ToString();

            extent.AddSystemInfo("Machine Name", machineName);

            extent.AddSystemInfo("Operating System", systemOS);

            return(extent);
        }
예제 #4
0
        public override void OnTestExecutionBegin(TestExecutor testExecutor, TestExecutionBeginArgs args)
        {
            // start reporters
            var htmlReporter = new ExtentHtmlReporter(@"C:\DevProjects\Quintity\Repos\TestFramework\Source\Quintity.TestFramework.TestListeners\Quintity.TestFramework.ListenerTests\TestResults\bob.html");

            // create ExtentReports and attach reporter(s)
            _extent = new AventStack.ExtentReports.ExtentReports();
            _extent.AttachReporter(htmlReporter);
            _extent.AddSystemInfo("sysname", "sysInfo");

            //// creates a test
            //var test = _extent.CreateTest("MyFirstTest", "Sample1 description");

            //// log(Status, details)
            //test.Log(AventStack.ExtentReports.Status.Info, "This step shows usage of log(status, details)");

            //// info(details)
            //test.Info("This step shows usage of info(details)");

            //// log with snapshot
            //test.Fail("details",
            //    MediaEntityBuilder.CreateScreenCaptureFromPath(@"c:\temp\screenshot.png").Build());

            //// test with snapshot
            //test.AddScreenCaptureFromPath(@"c:\temp\screenshot.png");

            //test = _extent.CreateTest("MySecondTest", "Sample2 description");
            //test.AssignAuthor(new string[] { "jmothers" });
            //var test2 = test.CreateNode("Bob", "FirstNode");
            //test2.CreateNode("Jim", "Nested node");
        }
예제 #5
0
        private static void reportInitalise()
        {
            string rootpath   = Directory.GetCurrentDirectory();
            string pathString = System.IO.Path.Combine(rootpath, @"Reports\Reports " + DateTime.UtcNow.ToString("yyyy-MM-dd-HH-mm-ss"));

            System.IO.DirectoryInfo ScreenShotdir = new System.IO.DirectoryInfo(pathString);

            if (!ScreenShotdir.Exists)
            {
                System.IO.Directory.CreateDirectory(pathString);
            }

            var htmlReporter = new ExtentHtmlReporter(pathString + "\\TestReport " + DateTime.UtcNow.ToString("yyyy-MM-dd-mm-ss") + ".html");

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;

            #region Klov Reporter sample
            //Attach report to reporter
            extent = new AventStack.ExtentReports.ExtentReports();
            // klov = new ExtentKlovReporter();

            //  klov.InitMongoDbConnection("localhost", 27017);
            //  klov.ProjectName = "Income And Expenses Sanisbury";

            //klov.ReportName = "Ravi Kota" + DateTime.Now.ToString();
            // klov.InitKlovServerConnection("http://localhost:5689");
            #endregion

            extent.AttachReporter(htmlReporter);
        }
예제 #6
0
 /// <summary>
 /// Create the ExtentManager, and define CSS/report configuration
 /// </summary>
 static ExtentManager()
 {
     _htmlReporter = new ExtentHtmlReporter(GetReportPath());
     _htmlReporter.Config.Theme = Theme.Dark;
     _extentReports             = new AventStack.ExtentReports.ExtentReports();
     _extentReports.AttachReporter(_htmlReporter);
 }
 public void StartReport()
 {
     htmlReporter.Config.Theme         = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
     htmlReporter.Config.DocumentTitle = "Test Repoprt | App Test";
     htmlReporter.Config.ReportName    = "Test Repoprt | App Test";
     extent.AttachReporter(htmlReporter);
 }
예제 #8
0
        public static void BeforeTestRun()
        {
            var reporter = new ExtentHtmlReporter(PathReport);

            _extent = new AventStack.ExtentReports.ExtentReports();
            _extent.AttachReporter(reporter);
        }
예제 #9
0
        public void BeforeClass()
        {
            // create a test report directory and attach reporter
            extent = new AventStack.ExtentReports.ExtentReports();

            dir = Directory.GetCurrentDirectory().Replace("\\bin\\Debug\\net5.0", "");
            Environment.CurrentDirectory = dir;
            if (Directory.Exists(dir + "\\Test_Execution_Reports"))
            {
                App.ClearFolder(dir + "\\Test_Execution_Reports");
            }

            DirectoryInfo di           = Directory.CreateDirectory(dir + "\\Test_Execution_Reports");
            var           htmlReporter = new ExtentHtmlReporter(dir + "\\Test_Execution_Reports\\Automation_Report.html");

            extent.AttachReporter(htmlReporter);
            extent.AddSystemInfo("Application Under Test", "nop Commerce Demo");
            extent.AddSystemInfo("Environment", "QA");
            extent.AddSystemInfo("Machine", Environment.MachineName);
            extent.AddSystemInfo("OS", Environment.OSVersion.VersionString);
            htmlReporter.Config.DocumentTitle = "NHS Covid-19 Track and Trace";
            htmlReporter.Config.ReportName    = "Automation Report for NHS Track & Trace APP";
            htmlReporter.Config.Reporter.Start();
            htmlReporter.Config.Theme = Theme.Standard;
        }
예제 #10
0
        /// <summary>Initializes the report.</summary>
        /// <param name="appFolderName">Name of the application folder.</param>
        /// <returns>Returns ExtentReport Object</returns>
        public static AventStack.ExtentReports.ExtentReports InitReport(string appFolderName)
        {
            var    folderName = GetDirName();
            string path;

            if (folderName != null || folderName != "")
            {
                path = Path.Combine(folderName.Substring(0, folderName.LastIndexOf("\\bin")), appFolderName + "\\");
                string folder = DateTime.Now.ToString("dd_MMM_yyyy");
                path = path + folder;
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                path   = path + "\\";
                folder = DateTime.Now.ToString("dd_MM_yyyy_hh_mm_ss_tt");
                path   = path + folder;
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                path = path + "\\";

                ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(path);
                htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
                AventStack.ExtentReports.ExtentReports extent = new AventStack.ExtentReports.ExtentReports();
                extent.AttachReporter(htmlReporter);
                return(extent);
            }
            else
            {
                return(null);
            }
        }
예제 #11
0
        public static void SetupReport()
        {
            if (extent == null)
            {
                var testOutput = ApplicationSettings.ReportOutput;
                if (!Directory.Exists(testOutput))
                {
                    Directory.CreateDirectory(testOutput);
                }

                var screenshotPath = ApplicationSettings.ReportScreenshotOutput;
                if (!Directory.Exists(screenshotPath))
                {
                    Directory.CreateDirectory(screenshotPath);
                }
                else if (ApplicationSettings.ClearOldScreenshot)
                {
                    var di = new DirectoryInfo(screenshotPath);
                    foreach (var item in di.GetFiles())
                    {
                        item.Delete();
                    }
                }

                htmlReporter = new ExtentHtmlReporter(testOutput);
                htmlReporter.Config.DocumentTitle = "KolektoHuur";
                htmlReporter.Config.ReportName    = "Kolekto Test Report";

                extent = new AventStack.ExtentReports.ExtentReports();
                extent.AddSystemInfo("Kolekto Integration", ApplicationSettings.KolektoIntegration);
                extent.AddSystemInfo("Kolekto Staging", ApplicationSettings.KolektoStaging);
                extent.AttachReporter(htmlReporter);
            }
        }
예제 #12
0
        private ReportHelper()
        {
            _extent = new AventStack.ExtentReports.ExtentReports();
            var reporter = new ExtentHtmlReporter($"D:/test/{DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss")}/");

            _extent.AttachReporter(reporter);
        }
예제 #13
0
 public static void InitialiseReport()
 {
     _extentHtmlReporter = new ExtentHtmlReporter(@"/circleci/UIAutomation.Integration.Tests/TestResults/Report.html");
     _extentHtmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
     _extentReports = new ExtentReports();
     _extentReports.AttachReporter(_extentHtmlReporter);
 }
예제 #14
0
        public static void TestInitalize()
        {
            //InitializeSettings();
            //Settings.ApplicationCon = Settings.ApplicationCon.DBConnect(Settings.AppConnectionString);

            //Initialize Extent report before test starts
            var htmlReporter = new ExtentHtmlReporter(@"C:\extentreport\SeleniumWithSpecflow\SpecflowParallelTest\ExtentReport.html");

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            //Attach report to reporter
            extent = new AventStack.ExtentReports.ExtentReports();
            klov   = new ExtentKlovReporter();

            //klov.InitMongoDbConnection("localhost", 27017);

            //klov.ProjectName = "ExecuteAutomation Test";

            //// URL of the KLOV server
            //klov.KlovUrl = "http://localhost:5689";

            //klov.ReportName = "Karthik KK" + DateTime.Now.ToString();


            extent.AttachReporter(htmlReporter);
        }
예제 #15
0
        public static void InitializeReport()
        {
            //Initialize Extent report before test start
            string _logFileName = string.Format("{0:yyyy-dd-M--HH-mm-ss}", DateTime.Now);

            string dir = @"C:\\dev\\ExtentReport\\TestResults\\ER--" + _logFileName;

            if (Directory.Exists(dir))
            {
            }
            else
            {
                Directory.CreateDirectory(dir);
            }

            var htmlReporter = new ExtentHtmlReporter(@"C:\\dev\\CoreProjectFramework\\TestResults\\ExtentReport\\ER--" + _logFileName + "\\");

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            //Attach report to reporter
            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReporter);

            //Need DB server to view the extent report

            //klov = new KlovReporter();

            //klov.InitMongoDbConnection("localhost", 27017);
            //klov.ProjectName = "AutomationProject";
            //klov.ReportName = "Vishnu" + DateTime.Now.ToString();

            //extent.AttachReporter(htmlReporter, klov);
        }
예제 #16
0
        public static void BeforeTestRun()
        {
            ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(cRutaReport);

            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
예제 #17
0
        public static void TestInitialize()
        {
            var htmlReporter = new ExtentHtmlReporter(Path.Combine(Directory.GetCurrentDirectory(), "ExtentReport.html"));

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
            _extent = new AventStack.ExtentReports.ExtentReports();
            _extent.AttachReporter(htmlReporter);
        }
예제 #18
0
        public static void StartReporter()
        {
            var reportDirectory = CreateReportDirectory();
            var htmlReporter    = new ExtentHtmlReporter(reportDirectory);

            Extent = new AventStack.ExtentReports.ExtentReports();
            Extent.AttachReporter(htmlReporter);
        }
예제 #19
0
        public ExtentReportHelper()
        {
            reportFullPath = $"{reportsPath}TestReport_{DateHelper.GetNowDateTimeAsString()}.html";
            htmlReporter   = new ExtentV3HtmlReporter(reportFullPath);

            extent.AttachReporter(htmlReporter);
            SetReportSystemInfo();
        }
예제 #20
0
        public static void SetupReporter()
        {
            extent = new AventStack.ExtentReports.ExtentReports();
            var htmlReporter = new ExtentHtmlReporter(GetReportsPath());

            extent.AttachReporter(htmlReporter);
            extent.AddSystemInfo("Environment", ExecutionConfig.Environment);
        }
예제 #21
0
        private static void GerarRelatorio()
        {
            string filePath   = Path.GetFullPath("report");
            var    htmlReport = new ExtentHtmlReporter(filePath);

            htmlReport.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReport);
        }
예제 #22
0
        public static void inicilizeReport()
        {
            var outPutDirectory             = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(outPutDirectory);

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
예제 #23
0
        protected void OneTimeSetup()
        {
            var dir          = "C:\\Users\\ACER\\Documents\\files\\session\\";
            var fileName     = this.GetType().ToString() + ".html";
            var htmlReporter = new ExtentHtmlReporter(dir + fileName);

            _extent = new AventStack.ExtentReports.ExtentReports();
            _extent.AttachReporter(htmlReporter);
        }
예제 #24
0
        public static void InitializeReport()
        {
            var htmlReporter = new ExtentHtmlReporter(@"C:\Users\Hp\source\repos\SprcFlow_NUnits\SprcFlow_NUnits\ExtentReport.html");

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;

            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
예제 #25
0
        public virtual void OneTimeSetUp()
        {
            ExtentReports = new Extent();
            var reporter = (new ExtentHtmlReporter(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "..\\..\\..\\..\\..\\..\\Reports\\Report " + DateTime.Now.ToString("yyyyMMdd-hms").Replace('/', ' ') + DriverType.ToString() + "\\ExtentReport.html"));

            reporter.Config.DocumentTitle = "SeleniumExample";
            reporter.Config.Theme         = Theme.Dark;
            ExtentReports.AttachReporter(reporter);
        }
예제 #26
0
        public static void InitializeReport()
        {
            var htmlReporter = new ExtentV3HtmlReporter(@"C:\Reports\FinalReport.html");

            htmlReporter.Config.Theme      = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            htmlReporter.Config.ReportName = "Report test" + DateTime.Now;
            report = new AventStack.ExtentReports.ExtentReports();
            report.AttachReporter(htmlReporter);
        }
예제 #27
0
 public static void CreateReport()
 {
     if (EXTENT_REPORT == null)
     {
         var htmlReporter = new ExtentHtmlReporter(fullReportFilePath);
         EXTENT_REPORT = new AventStack.ExtentReports.ExtentReports();
         EXTENT_REPORT.AttachReporter(htmlReporter);
     }
 }
예제 #28
0
        public static void InitializeReport()
        {
            string file         = "ExtentReport.html";
            var    path         = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, file);
            var    htmlReporter = new ExtentHtmlReporter(path);

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            extent = new AventStack.ExtentReports.ExtentReports();
            extent.AttachReporter(htmlReporter);
        }
예제 #29
0
        public static void InitializeReport()
        {
            _extent = new AventStack.ExtentReports.ExtentReports();
            var htmlReporter = new ExtentV3HtmlReporter($"{_reportingPath}\\BTAMReport {DateTime.Now.ToString("dd-MMM-yyyy hh.mm.ss")}.html");

            htmlReporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            _extent.AttachReporter(htmlReporter);

            Directory.CreateDirectory(_screenshotsPath);
        }
예제 #30
0
        public void CreateReport(string test, string task)
        {
            path = AppDomain.CurrentDomain.BaseDirectory + @"..\..\..\Reports\" + task + @"\" + DateTime.Now.ToString("HH-mm dd-MM-yyyy") + @"\";
            var htmlReport = new ExtentHtmlReporter(path);

            report = new AventStack.ExtentReports.ExtentReports();
            report.AttachReporter(htmlReport);
            CreateTest(test);
            report.Flush();
        }