public void RestoreDb() { if (Convert.ToBoolean(ConfigurationManager.AppSettings["restoreDatabase"])) { // Helper.DebugLog("Przywracanie bazy danych"); try { var snapshotRestore = ConfigurationManager.AppSettings["restoreFromSnapshot"]; if (snapshotRestore != null) { DBHelper.Setup(Convert.ToBoolean(snapshotRestore)); } else { DBHelper.Setup(); } } catch (Exception e) { //Helper.ReportLog(ReportLevel.Error, "Przywracanie bazy danych nie powiodlo sie " + e); RecordHelper.StopRecord(); Assert.Fail(); } } }
public void TearDown() { RecordHelper.StopRecord(); if (CloseBrowserAfterTest) { MainPage.CloseBrowser(); } }
public void TestFail(Exception e, MethodBase testName) { TestSuccess = false; //Helper.ReportLog(ReportLevel.Error, Regex.Replace(e.ToString(), "<[^>]+>", string.Empty), testName); // Helper.FailLog("Test " + testName + " zakończony niepowodzeniem"); DebugHelper.Logger.Info("Fail testu :" + testName + "ex : " + e); if (MainPage != null) { MainPage.TakeScreenshot(); } RecordHelper.StopRecord(false); Assert.Fail(e.Message); }