public void Report(ScenarioReportingContext scenario) { foreach (var target in _targets) { target.Report(scenario); } }
public void Report(ScenarioReportingContext scenario) { // if this test isn't categorized into a feature bucket, don't output it! if (scenario.FeatureReport == null) { return; } var featureName = scenario.FeatureReport.Name; if (_featureState.ContainsKey(featureName)) { using (var fs = File.Open(_featureState[featureName].Path, FileMode.Append, FileAccess.Write)) { using (var writer = new StreamWriter(fs)) { writer.WriteLine(scenario.CreateReport(omitFeatureOutput: true)); } } } else { _featureState.Add(featureName, new { Path = string.Format("{0}.feature", CoerceValidFileName(featureName)) }); using (var fs = File.Create(_featureState[featureName].Path)) { using (var writer = new StreamWriter(fs)) { writer.WriteLine(scenario.CreateReport()); } } } }
public void Report(ReportType reportType, ScenarioReportingContext reportingContext) { // only output current test info if running in R# -- it's not useful in command line builds if (reportType == ReportType.CurrentTest) { var executingProcessName = Process.GetCurrentProcess().ProcessName; if (executingProcessName.IndexOf("JetBrains.ReSharper", StringComparison.InvariantCultureIgnoreCase) == -1) { return; } } int indentationLevel = 0; // avoid repeating the same feature over and over var featureKey = GetKey(reportingContext.FeatureReport); if (featureKey != null && featureKey == _previousFeatureKey) { indentationLevel = 1; reportingContext.FeatureReport.Clear(); } Trace.WriteLine(reportingContext.CreateReportWithStandardSpacing(indentationLevel)); _previousFeatureKey = featureKey; }
public void Report(ScenarioReportingContext scenario) { Trace.WriteLine(scenario.CreateReport()); }
public void Report(ScenarioReportingContext scenario) { WriteCount++; }
public void Report(ScenarioReportingContext scenario) { ReportString += scenario.CreateReport(); }
public void Report(ReportType reportType, ScenarioReportingContext reportingContext) { ReportString += reportingContext.CreateReportWithStandardSpacing(0); }
public void Report(ReportType reportType, ScenarioReportingContext reportingContext) { WriteCount++; }