public SpecResults Execute(Specification specification) { var plan = specification.CreatePlan(_library); var timings = new Timings(); _warmup.Wait(1.Minutes()); timings.Start(specification); IExecutionContext execution = null; SpecContext context = null; try { using (timings.Record("Context", "Creation")) { execution = _system.CreateContext(); } context = new SpecContext(specification, timings, new NulloResultObserver(), StopConditions, execution); context.Reporting.As <Reporting>().StartDebugListening(); SpecExecution.RunAll(context, plan); } finally { execution?.Dispose(); context?.Dispose(); } return(context.FinalizeResults(1)); }
public SpecResults Run(Specification specification) { var plan = specification.CreatePlan(_running.Fixtures); var timings = new Timings(); _warmup.Wait(1.Minutes()); timings.Start(specification); IExecutionContext execution = null; SpecContext context = null; try { using (timings.Record("Context", "Creation")) { execution = _running.System.CreateContext(); } context = new SpecContext(specification, timings, new NulloResultObserver(), StopConditions, execution); execution.BeforeExecution(context); context.Reporting.As <Reporting>().StartDebugListening(); SpecExecution.RunAll(context, plan); execution.AfterExecution(context); } finally { execution?.Dispose(); context?.Dispose(); } var results = context.FinalizeResults(1); _records.Add(new BatchRecord { results = results, specification = specification }); return(results); }
public SpecResults Execute(Specification specification) { var plan = specification.CreatePlan(_library); var timings = new Timings(); _warmup.Wait(1.Minutes()); timings.Start(specification); IExecutionContext execution = null; SpecContext context = null; try { using (timings.Subject("Context", "Creation")) { execution = _system.CreateContext(); } context = new SpecContext(specification, timings, new NulloResultObserver(), StopConditions, execution); context.Reporting.As <Reporting>().StartDebugListening(); var executor = new SynchronousExecutor(context); plan.AcceptVisitor(executor); } finally { if (execution != null) { execution.Dispose(); } if (context != null) { context.Dispose(); } } return(context.FinalizeResults(1)); }