org.spockframework.runtime
Class BaseSpecRunner

java.lang.Object
  extended by org.spockframework.runtime.BaseSpecRunner
Direct Known Subclasses:
ParameterizedSpecRunner

public class BaseSpecRunner
extends java.lang.Object

Executes a single Spec. Notifies its supervisor about overall execution progress and every invocation of Spec code. Supervisor also determines the error strategy.

Author:
Peter Niederwieser

Field Summary
protected  FeatureInfo currentFeature
           
protected  java.lang.Object currentInstance
           
protected  IterationInfo currentIteration
           
protected static java.lang.Object[] EMPTY_ARGS
           
protected  int runStatus
           
protected  java.lang.Object sharedInstance
           
protected  SpecInfo spec
           
protected  IRunSupervisor supervisor
           
 
Constructor Summary
BaseSpecRunner(SpecInfo spec, IRunSupervisor supervisor)
           
 
Method Summary
 void doRunFeature()
          Only called via reflection.
 void doRunIteration()
          Only called via reflection.
 void doRunSpec()
          Only called via reflection.
protected  void initializeAndRunIteration(java.lang.Object[] dataValues, int estimatedNumIterations)
           
protected  java.lang.Object invokeRaw(java.lang.Object target, MethodInfo method, java.lang.Object... arguments)
           
protected  int resetStatus(int scope)
           
 int run()
           
protected  void runParameterizedFeature()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ARGS

protected static final java.lang.Object[] EMPTY_ARGS

spec

protected final SpecInfo spec

supervisor

protected final IRunSupervisor supervisor

currentFeature

protected FeatureInfo currentFeature

currentIteration

protected IterationInfo currentIteration

sharedInstance

protected java.lang.Object sharedInstance

currentInstance

protected java.lang.Object currentInstance

runStatus

protected int runStatus
Constructor Detail

BaseSpecRunner

public BaseSpecRunner(SpecInfo spec,
                      IRunSupervisor supervisor)
Method Detail

run

public int run()

doRunSpec

public void doRunSpec()
Only called via reflection.


doRunFeature

public void doRunFeature()
Only called via reflection.


initializeAndRunIteration

protected void initializeAndRunIteration(java.lang.Object[] dataValues,
                                         int estimatedNumIterations)

doRunIteration

public void doRunIteration()
Only called via reflection.


resetStatus

protected int resetStatus(int scope)

runParameterizedFeature

protected void runParameterizedFeature()

invokeRaw

protected java.lang.Object invokeRaw(java.lang.Object target,
                                     MethodInfo method,
                                     java.lang.Object... arguments)


Copyright © 2013. All rights reserved