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)); }
protected void executeSpec(Specification spec) { _context = new SpecContext(spec, null, new NulloResultObserver(), new StopConditions(), new TestExecutionContext(Services)); var plan = spec.CreatePlan(TestingContext.Library); PerfRecords = SpecExecution.RunAll(_context, plan).ToArray(); }
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); }