Ejemplo n.º 1
0
 public void AfterScenario()
 {
     log.Trace(MethodBase.GetCurrentMethod().Name);
     if (ReportFileInstance.CurrentScenario != null)
     {
         ReportFileInstance.UpdateCurrentFeatureWithFileContent(FeatureFilePath, GetFullFeaturePath(FeatureFilePath));
         ReportFileInstance.WriteToXml(TestResultsDirectory);
         ReportFileInstance.CurrentScenario = null;
     }
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }