Package org.spockframework.runtime
Class BaseSpecRunner
- java.lang.Object
-
- org.spockframework.runtime.BaseSpecRunner
-
- Direct Known Subclasses:
ParameterizedSpecRunner
public class BaseSpecRunner extends java.lang.ObjectExecutes 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
Fields Modifier and Type Field Description protected FeatureInfocurrentFeatureprotected SpecificationcurrentInstanceprotected IterationInfocurrentIterationprotected static java.lang.Object[]EMPTY_ARGSprotected intrunStatusprotected SpecificationsharedInstanceprotected SpecInfospecprotected IRunSupervisorsupervisor
-
Constructor Summary
Constructors Constructor Description BaseSpecRunner(SpecInfo spec, IRunSupervisor supervisor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoRunFeature()Only called via reflection.voiddoRunIteration()Only called via reflection.voiddoRunSpec()Only called via reflection.protected SpecificationContextgetSpecificationContext(Specification instance)protected voidinitializeAndRunIteration(java.lang.Object[] dataValues, int estimatedNumIterations)protected java.lang.ObjectinvokeRaw(java.lang.Object target, MethodInfo method, java.lang.Object... arguments)protected intresetStatus(int scope)intrun()protected voidrunParameterizedFeature()
-
-
-
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 Specification sharedInstance
-
currentInstance
protected Specification 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)
-
getSpecificationContext
protected SpecificationContext getSpecificationContext(Specification instance)
-
-