protected override void PostTestInit(object sender, TestExecutionEventArgs e) { this.recordingMode = this.ConfigureTestVideoRecordingMode(e.MemberInfo); if (this.recordingMode != VideoRecordingMode.DoNotRecord) { this.videoRecorder.StartCapture(); } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { foreach (var testExecutionEngine in _testExecutionEngines) { if (testExecutionEngine != null) { testExecutionEngine.Dispose(); } } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { int? bugId = this.TryGetBugId(e.MemberInfo); if (bugId.HasValue) { Console.WriteLine(string.Format("The test '{0}' is associated with bug id: {1}", e.TestContext.TestName, bugId.Value)); } else { Console.WriteLine(string.Format("The test '{0}' is not associated with any bug id.", e.TestContext.TestName)); } }
protected override void PostTestInit(object sender, TestExecutionEventArgs e) { _recordingMode = ConfigureTestVideoRecordingMode(e.MemberInfo); if (_recordingMode != VideoRecordingMode.DoNotRecord) { var fullTestName = $"{e.MemberInfo.DeclaringType.Name}.{e.TestName}"; var videoRecordingDir = _videoRecorderOutputProvider.GetOutputFolder(); var videoRecordingFileName = _videoRecorderOutputProvider.GetUniqueFileName(fullTestName); _videoRecordingPath = _videoRecorder.Record(videoRecordingDir, videoRecordingFileName); } }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { _executionBrowserType = ConfigureTestExecutionBrowser(e.MemberInfo); foreach (var testExecutionEngine in _testExecutionEngines) { if (testExecutionEngine.IsSelected(e.MemberInfo)) { testExecutionEngine.RegisterDependencies(_executionBrowserType); break; } } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { var bugId = TryGetBugId(e.MemberInfo); if (bugId.HasValue) { Console.WriteLine(string.Format("The test '{0}' is associated with bug id: {1}", e.TestContext.TestName, bugId.Value)); } else { Console.WriteLine(string.Format("The test '{0}' is not associated with any bug id.", e.TestContext.TestName)); } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { if (_recordingMode != VideoRecordingMode.DoNotRecord) { try { bool hasTestPassed = e.TestOutcome.Equals(TestOutcome.Passed); DeleteVideoDependingOnTestOutcome(hasTestPassed); } finally { _videoRecorder.Dispose(); } } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { try { string videosFolderPath = ConfigurationManager.AppSettings["videosFolderPath"]; string testName = e.TestName; bool hasTestPassed = e.TestOutcome.Equals(TestOutcome.Passed); this.SaveVideoDependingOnTestoutcome(videosFolderPath, testName, hasTestPassed); } catch (Exception ex) { Console.WriteLine(ex); throw; } finally { this.videoRecorder.Dispose(); } }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { _driver.Quit(); }
protected override void PostTestCleanup(object sender, TestExecutionEventArgs e) { Driver.StopBrowser(); }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { var browserType = GetExecutionBrowser(e.MemberInfo); Driver.StartBrowser(browserType); }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { var browserType = this.GetExecutionBrowser(e.MemberInfo); Driver.StartBrowser(browserType); }
protected virtual void PreTestInit(object sender, TestExecutionEventArgs e) { }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { this.ThrowExceptionIfOwnerAttributeNotSet(e.MemberInfo); }
protected virtual void PostTestFixtureInit(object sender, TestExecutionEventArgs e) { }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { InitializeDriver(e.MemberInfo); }
protected override void PreTestFixtureInit(object sender, TestExecutionEventArgs e) { ThrowExceptionExecutionEngineNotSet(e.MemberInfo); InitializeDriver(e.MemberInfo); }
protected virtual void PreTestFixtureCleanup(object sender, TestExecutionEventArgs e) { }
protected override void PreTestInit(object sender, TestExecutionEventArgs e) { _executionBrowserType = ConfigureTestExecutionBrowser(e.MemberInfo); _executionEngineType = GetExecutionEngineType(e.MemberInfo); ResolveAllDriverDependencies(); }
protected virtual void TestInstantiated(object sender, TestExecutionEventArgs e) { }
protected virtual void PostTestCleanup(object sender, TestExecutionEventArgs e) { }