public void AfterStep() { try { var currentStep = ReportPortalAddin.GetStepTestReporter(this.StepContext); var stepFinishRequest = new FinishTestItemRequest { EndTime = DateTime.UtcNow }; if (this.ScenarioContext.ScenarioExecutionStatus == ScenarioExecutionStatus.TestError) { stepFinishRequest.Status = Status.Failed; } var eventArg = new StepFinishedEventArgs(_service, stepFinishRequest, currentStep, this.FeatureContext, this.ScenarioContext, this.StepContext); ReportPortalAddin.OnBeforeStepFinished(this, eventArg); if (!eventArg.Canceled) { currentStep.Finish(stepFinishRequest); ReportPortalAddin.RemoveStepTestReporter(this.StepContext, currentStep); ReportPortalAddin.OnAfterStepFinished(this, eventArg); } } catch (Exception exp) { _traceLogger.Error(exp.ToString()); } finally { ContextAwareLogHandler.ActiveStepContext = null; } }
internal static void OnAfterStepFinished(object sender, StepFinishedEventArgs eventArg) { try { AfterStepFinished?.Invoke(sender, eventArg); } catch (Exception exp) { Logger.Error($"Exception occured in {nameof(OnAfterStepFinished)} event handler: {exp}"); } }
public void AfterStep() { var currentScenario = ReportPortalAddin.GetScenarioTestReporter(this.ScenarioContext); if (currentScenario != null) { var eventArg = new StepFinishedEventArgs(Bridge.Service, null, null); ReportPortalAddin.OnBeforeStepFinished(this, eventArg); if (!eventArg.Canceled) { ReportPortalAddin.OnAfterStepFinished(this, eventArg); } } }
private void AppLoader_StepFinished(object sender, StepFinishedEventArgs e) { Progress = 100.0 * e.FinishedStep / e.TotalStepCount; }
internal static void OnAfterStepFinished(object sender, StepFinishedEventArgs eventArg) { AfterStepFinished?.Invoke(sender, eventArg); }