protected void Deregister(IExtentReporter reporter)
 {
     lock (_synclock)
     {
         reporter.Stop();
         StarterReporterList.Remove(reporter);
     }
 }
 /// <summary>
 /// Subscribe the reporter to receive updates
 /// </summary>
 /// <param name="reporter"><see cref="IExtentReporter"/></param>
 protected void Register(IExtentReporter reporter)
 {
     lock (_synclock)
     {
         reporter.Start();
         StarterReporterList.Add(reporter);
     }
 }
        protected void Attach(IExtentReporter reporter)
        {
            if (_reporterCollection == null)
            {
                _reporterCollection = new List <IExtentReporter>();
            }

            _reporterCollection.Add(reporter);
            reporter.Start();
        }
Esempio n. 4
0
        static ExtentManager()
        {
            try
            {
                Directory.CreateDirectory(ExtentReportPath);
                HtmlReporter = new ExtentHtmlReporter(reportFilePath);
                HtmlReporter = (ExtentHtmlReporter)GetHtmlReporter();

                _lazy = new Lazy <ExtentReports>(() => new ExtentReports());

                IExtentReporter reporterType = null;

                if (reporter == ReporterType.Klov)
                {
                    reporterType = GetKlovReporter(GridVmIP);
                }
                else
                {
                    reporterType = HtmlReporter;
                }

                //GetReportInstance().AddSystemInfo("Tenant", tenantName.ToString());
                //GetReportInstance().AddSystemInfo("Environment", testEnv.ToString());
                //GetReportInstance().AddSystemInfo("URL", siteUrl);

                var reportInstance = GetReportInstance();
                reportInstance.AttachReporter(reporterType);
                reportInstance.AddSystemInfo("Tenant", tenantName.ToString());
                reportInstance.AddSystemInfo("Environment", testEnv.ToString());
                reportInstance.AddSystemInfo("URL", siteUrl);
            }
            catch (Exception e)
            {
                log.Error(e.StackTrace);
                throw;
            }
        }
 protected void Detach(IExtentReporter reporter)
 {
     reporter.Stop();
     _reporterCollection.Remove(reporter);
 }
Esempio n. 6
0
        public static void Report(IExtentReporter report)
        {
            var extent = new ExtentReports();

            extent.AttachReporter(report);
        }