public void OnFeatureEnd() { // if the unit test provider would execute the fixture teardown code // only delayed (at the end of the execution), we ignore the // feature-end call, if the feature has been closed already if (unitTestRuntimeProvider.DelayedFixtureTearDown && contextManager.FeatureContext == null) { return; } FireEvents(HookType.AfterFeature); if (runtimeConfiguration.TraceTimings) { contextManager.FeatureContext.Stopwatch.Stop(); var duration = contextManager.FeatureContext.Stopwatch.Elapsed; testTracer.TraceDuration(duration, "Feature: " + contextManager.FeatureContext.FeatureInfo.Title); } contextManager.CleanupFeatureContext(); }
public virtual void OnFeatureEnd() { // if the unit test provider would execute the fixture teardown code // only delayed (at the end of the execution), we ignore the // feature-end call, if the feature has been closed already if (_unitTestRuntimeProvider.DelayedFixtureTearDown && FeatureContext == null) { return; } FireEvents(HookType.AfterFeature); if (_specFlowConfiguration.TraceTimings) { FeatureContext.Stopwatch.Stop(); var duration = FeatureContext.Stopwatch.Elapsed; _testTracer.TraceDuration(duration, "Feature: " + FeatureContext.FeatureInfo.Title); } _testThreadExecutionEventPublisher.PublishEvent(new FeatureFinishedEvent(FeatureContext)); _contextManager.CleanupFeatureContext(); }