public void AfterScenario() { log.Trace(MethodBase.GetCurrentMethod().Name); if (ReportFileInstance.CurrentScenario != null) { ReportFileInstance.UpdateCurrentFeatureWithFileContent(FeatureFilePath, GetFullFeaturePath(FeatureFilePath)); ReportFileInstance.WriteToXml(TestResultsDirectory); ReportFileInstance.CurrentScenario = null; } }
public static void BeforeFeature() { log.Trace(MethodBase.GetCurrentMethod().Name); if (FeatureContext.Current != null) { ReportFileInstance.CurrentFeature = new FeatureElement(); ReportFileInstance.CurrentFeature.Started = GetStartUnixTime(); ReportFileInstance.CurrentFeature.Name = FeatureContext.Current.FeatureInfo.Title; var tidTag = FeatureContext.Current.FeatureInfo.Tags.FirstOrDefault(tag => tag.StartsWith("@TID")); ReportFileInstance.CurrentFeature.Tag = string.IsNullOrEmpty(tidTag) ? string.Empty : tidTag; ReportFileInstance.OctaneSpecflowReport.Features.Add(ReportFileInstance.CurrentFeature); ReportFileInstance.UpdateCurrentFeatureWithFileContent(FeatureFilePath, GetFullFeaturePath(FeatureFilePath)); ReportFileInstance.WriteToXml(TestResultsDirectory); } }
public void BeforeScenario() { log.Trace(MethodBase.GetCurrentMethod().Name); if (ReportFileInstance.CurrentFeature != null && ScenarioContext.Current != null) { ReportFileInstance.CurrentScenario = new ScenarioElement(); ReportFileInstance.CurrentScenario.Name = ScenarioContext.Current.ScenarioInfo.Title; ReportFileInstance.CurrentFeature.Scenarios.Add(ReportFileInstance.CurrentScenario); if (ReportFileInstance.OctaneSpecflowReport.Features.Count == 0) { ReportFileInstance.OctaneSpecflowReport.Features.Add(ReportFileInstance.CurrentFeature); } ReportFileInstance.UpdateCurrentFeatureWithFileContent(FeatureFilePath, GetFullFeaturePath(FeatureFilePath)); ReportFileInstance.WriteToXml(TestResultsDirectory); } }