Ejemplo n.º 1
0
        public void MyScenarioCleanup()
        {
            try
            {
                // Clean up all connections and generate report
                var testFinalStatus = CheckTestCaseStatus();
                var message         = EnvironmentVariableHelper.GetBddStepDescription() +
                                      TestContext.CurrentContext.Result.Message;

                var stackTrace = TestContext.CurrentContext.Result.StackTrace;

                TestCaseProvider.Instance
                .LogTestCaseFinalStatus(testFinalStatus, message, stackTrace,
                                        TestCaseInfo.TestCaseFullName, TestCaseInfo.TestCaseName);

                BaseTestManagerClass.MyTestCleanupClose();
                ProcessManager.KillProcess("chrome");
            }
            catch (Exception e)
            {
                // Clean up all connections and generate report
                BaseTestManagerClass.MyTestCleanupClose();

                //Kill chrome driver
                ProcessManager.KillProcess("chromedriver");
                ProcessManager.KillProcess("chrome");

                ExceptionManager.WarningMessageLog(e.Message);
            }
        }