예제 #1
0
 internal ScenarioRunner(Scenario scenario, CoreFactory factory)
 {
     this.scenario = scenario;
     this.factory = factory;
     stepExecutor = factory.CreateStepExecutor(scenario);
     statsCascader = factory.UtilityFactory.CreateStatsCascader();
 }
예제 #2
0
 internal ScenarioRunner(Scenario scenario, CoreFactory factory)
 {
     this.scenario = scenario;
     this.factory  = factory;
     stepExecutor  = factory.CreateStepExecutor(scenario);
     statsCascader = factory.UtilityFactory.CreateStatsCascader();
     this.SetOutputWriter(new OutputWriter());
 }
예제 #3
0
 public void HandleException(StepExecutor stepExecutor, Step step, Exception ex)
 {
     if (ex is NotImplementedException)
     {
         ProcessNotImplementedException(stepExecutor, step, ex as NotImplementedException);
     }
     else
     {
         ProcessException(stepExecutor, step, ex);
     }
 }
예제 #4
0
 void ProcessException(StepExecutor stepExecutor, Step step, Exception ex)
 {
     step.EndTime = DateTime.Now;
     step.Outcome = Outcome.Failed;
     step.Reason = ex.Message;
     step.Exception = ex;
     if (scenario.Reason == null)
         scenario.Reason = "Failed Step";
     statsCascader.CascadeStats(step, false);
     throw new StepException(step.Name, ex);
 }
예제 #5
0
 void ProcessNotImplementedException(StepExecutor stepExecutor, Step step, NotImplementedException ex)
 {
     step.EndTime = DateTime.Now;
     step.Outcome = Outcome.Failed;
     step.Reason = "Not Implemented";
     step.Exception = ex;
     if (scenario.Reason == null)
         scenario.Reason = "Step Not Implemented";
     statsCascader.CascadeStats(step, false);
     throw new StepNotImplementedException(step.Name, ex);
 }
예제 #6
0
 void ProcessException(StepExecutor stepExecutor, Step step, Exception ex)
 {
     step.EndTime   = DateTime.Now;
     step.Outcome   = Outcome.Failed;
     step.Reason    = "Failed";
     step.Exception = ex;
     if (scenario.Reason == null)
     {
         scenario.Reason = "Failed";
     }
     statsCascader.CascadeStepStats(step, false);
     throw new StepException(step.Name, ex);
 }
예제 #7
0
 public void HandleException(StepExecutor stepExecutor, Step step, Exception ex)
 {
     if (ex is SkipStepException)
     {
         ProcessSkipException(stepExecutor, step, ex as SkipStepException);
     }
     else if (ex is NotImplementedException)
     {
         ProcessNotImplementedException(stepExecutor, step, ex as NotImplementedException);
     }
     else
     {
         ProcessException(stepExecutor, step, ex);
     }
 }