Example #1
0
 public static void Initialize(IReporterSettings settings)
 {
     lock (Lock)
     {
         if (_initialized)
         {
             return;
         }
         _reporter    = new Reporter(settings);
         _initialized = true;
     }
 }
Example #2
0
        private void InitializeReporter(IReporterSettings settings)
        {
            if (settings.OutputPath == null)
            {
                throw new ArgumentNullException(nameof(settings.OutputPath),
                                                "Reporter Output must be specified! Fix your settings.");
            }
            Settings = settings;

            _action    = new ActionHelper(settings.OutputPath);
            _extractor = new ResourceExtractor(_action, settings.OutputPath);
        }
Example #3
0
        public Reporter(IReporterSettings settings)
        {
            OutputPath = settings.OutputPath;
            TakeScreenshotAfterFail = settings.TakeScreenshotAfterFail;
            Sprint             = settings.Sprint;
            RunName            = settings.RunName;
            RunGuid            = settings.RunGuid;
            RealTimeGeneration = settings.RealTimeGeneration;

            _actionHelper = new ActionHelper(OutputPath);
            _extractor    = new ResourceExtractor(_actionHelper, OutputPath);
        }
Example #4
0
 private void InitializeReporter(IReporterSettings settings)
 {
     if (settings.OutputPath == null)
     {
         throw new ArgumentNullException(nameof(settings.OutputPath),
                                         "Reporter Output path must be specified. Please fix your .json settings file.");
     }
     Settings       = settings;
     ReportSettings = new ReportSettings(settings.RunsToDisplay, settings.TestsToDisplay);
     _action        = new ActionHelper(settings.OutputPath);
     _extractor     = new ResourceExtractor(_action, settings.OutputPath);
     TestRunStarted = false;
 }
Example #5
0
        private Task ScheduleReport(IMetrics context, CancellationToken token, KeyValuePair <Type, IMetricReporter> metricReporter, ILogger logger,
                                    IReporterProvider provider,
                                    IReporterSettings settings)
        {
            return(_scheduler.Interval(metricReporter.Value.ReportInterval, async() =>
            {
                var startTimestamp = _logger.IsEnabled(LogLevel.Information) ? Stopwatch.GetTimestamp() : 0;

                logger.ReportedStarted(metricReporter.Value);

                await _reportGenerator.Generate(metricReporter.Value, context, provider.Filter, token);

                logger.ReportRan(metricReporter.Value, startTimestamp);
            },
                                       token));
        }
Example #6
0
 public Reporter(IReporterSettings settings)
 {
     InitializeReporter(settings);
 }