コード例 #1
0
ファイル: EventsHandler.cs プロジェクト: nayods/BDD
        public static void BeforeTestRun()
        {
            InitializeSettings();
            NaviateSite();
            HtmlReports.SetUpHtmlReport();

            // TODO: implement logic that has to run before the entire test run
        }
コード例 #2
0
ファイル: EventsHandler.cs プロジェクト: nayods/BDD
        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
        }
コード例 #3
0
ファイル: EventsHandler.cs プロジェクト: nayods/BDD
        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
        }
コード例 #4
0
ファイル: EventsHandler.cs プロジェクト: nayods/BDD
 public static void AfterTestRun()
 {
     HtmlReports.FlushCloseHtmlReport();
     DriverContext.Driver.Quit();
     // TODO: implement logic that has to run after the entire test run
 }