public static void BeforeTestRun() { InitializeSettings(); NaviateSite(); HtmlReports.SetUpHtmlReport(); // TODO: implement logic that has to run before the entire test run }
public void BeforeScenario() { featurename = FeatureContext.Current.FeatureInfo.Title; scenarioname = ScenarioContext.Current.ScenarioInfo.Title; // Log.Write("Executing Scenario " + scenarioname); HtmlReports.StartHtmlReports(scenarioname, null, featurename + " Feature"); Log.Write("SCENARIO NAME = " + ScenarioContext.Current.ScenarioInfo.Title.ToUpper()); // TODO: implement logic that has to run before executing each scenario }
public void AfterScenario() { if (ScenarioContext.Current.TestError != null) { HtmlReports.ProcesSpecFlowReports("fail", ReturnScreenShotPath(), scenarioname); Log.Write("SCENARIO ERROR = " + ScenarioContext.Current.TestError.Message.ToUpper()); Log.Write("SCENARIO STATUS = FAILED"); } else { HtmlReports.ProcesSpecFlowReports(null, null, scenarioname); Log.Write("SCENARIO STATUS = PASSED"); } // TODO: implement logic that has to run after executing each scenario }
public static void AfterTestRun() { HtmlReports.FlushCloseHtmlReport(); DriverContext.Driver.Quit(); // TODO: implement logic that has to run after the entire test run }