Interface StepExecutionInvocationHandler
-
- All Known Implementing Classes:
AssertPostPageStepExecutionInvocationHandler
,JUnitFilterStepExecutionInvocationHandler
public interface StepExecutionInvocationHandler
TheStepExecutionInvocationHandler
is notified each time a step before (handlePreInvoke(TestStep, Object)
) and after (handlePostInvoke(TestStep, Object)
as step is executed. In contrast toExecutionListener
it's possible to influence the result of the step execution.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StepExecutionInvocationHandler.Result
The result tells theExecutionPlanExecutor
how to proceed the step execution.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handlePostInvoke(TestStep testStep, java.lang.Object testInstance)
This method is called after a step is executed successfully.StepExecutionInvocationHandler.Result
handlePreInvoke(TestStep testStep, java.lang.Object testInstance)
This method is called before a step is executed.
-
-
-
Method Detail
-
handlePreInvoke
StepExecutionInvocationHandler.Result handlePreInvoke(TestStep testStep, java.lang.Object testInstance)
This method is called before a step is executed. By returningPROCEED
the step is executed afterwards. By returningSKIP
the step is skipped. Moreover it's possible to throw aRuntimeException
in order to mark the step as failed.- Parameters:
testStep
- the step which should be executedtestInstance
- the test instance which is used to execute the step- Returns:
- the result
- Throws:
java.lang.RuntimeException
- an exception leads to a step failure- Since:
- 2.0.0
-
handlePostInvoke
void handlePostInvoke(TestStep testStep, java.lang.Object testInstance)
This method is called after a step is executed successfully. It's possible to throw aRuntimeException
in order to mark the step as failed.- Parameters:
testStep
- the step which has been executed successfullytestInstance
- the test instance which has been used to execute the step- Throws:
java.lang.RuntimeException
- an exception leads to a step failure- Since:
- 2.0.0
-
-