示例#1
0
 public void StartHtmlReport(string documentTitle, string reportName)
 {
     _htmlReporter = new ExtentHtmlReporter(_reportPath);
     _htmlReporter.Start();
     _htmlReporter.Configuration().Theme         = Theme.Dark;
     _htmlReporter.Configuration().DocumentTitle = documentTitle;
     _htmlReporter.Configuration().ReportName    = reportName;
     Extent.AttachReporter(_htmlReporter);
 }
示例#2
0
        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">ReportFilePath</exception>
        public IReporter Initialize()
        {
            if (string.IsNullOrEmpty(_options.ReportFilePath))
            {
                throw new ArgumentNullException(nameof(_options.ReportFilePath));
            }

            _reporter     = new ExtentHtmlReporter(_options.ReportFilePath);
            _extentReport = new AventStack.ExtentReports.ExtentReports();
            _extentReport.AttachReporter(_reporter);
            _reporter.Start();

            return(this);
        }