Class QtafTestNGAnnotatedMethodInterceptor<T extends AbstractStepExecutionInfo>
java.lang.Object
de.qytera.qtaf.core.guice.method_interceptor.QtafTestNGAnnotatedMethodInterceptor<T>
- Type Parameters:
T- the test execution info type
- All Implemented Interfaces:
AbstractTestNGAnnotatedMethodInterceptor<T>,org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor
- Direct Known Subclasses:
QtafTestNGAfterMethodInterceptor,QtafTestNGAfterSuiteInterceptor,QtafTestNGAfterTestInterceptor,QtafTestNGBeforeMethodInterceptor,QtafTestNGBeforeSuiteInterceptor,QtafTestNGBeforeTestInterceptor
public abstract class QtafTestNGAnnotatedMethodInterceptor<T extends AbstractStepExecutionInfo>
extends Object
implements org.aopalliance.intercept.MethodInterceptor, AbstractTestNGAnnotatedMethodInterceptor<T>
Method interceptor for methods that are annotated with the Step annotation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final rx.subjects.PublishSubject<T>Publisher which notifies all subjects after failed step executions.protected final rx.subjects.PublishSubject<T>Publisher which notifies all subjects after successful step executions.protected final rx.subjects.PublishSubject<T>Publisher which notifies all subjects before step executions. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQtafTestNGAnnotatedMethodInterceptor(rx.subjects.PublishSubject<T> beforeStepExecution, rx.subjects.PublishSubject<T> afterStepExecutionSuccess, rx.subjects.PublishSubject<T> afterStepExecutionFailure) Return a QtafTestNGAnnotatedMethodInterceptor Object. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.qytera.qtaf.core.guice.method_interceptor.AbstractTestNGAnnotatedMethodInterceptor
buildFeatureLogCollection, buildScenarioDescription, buildScenarioLogCollection, buildScenarioName, buildStepExecutionInfoEntity, executeStepMethod, getAnnotation, handleStepExecutionFailure, updateTestContextWithLogCollection
-
Field Details
-
beforeStepExecution
Publisher which notifies all subjects before step executions. -
afterStepExecutionSuccess
protected final rx.subjects.PublishSubject<T extends AbstractStepExecutionInfo> afterStepExecutionSuccessPublisher which notifies all subjects after successful step executions. -
afterStepExecutionFailure
protected final rx.subjects.PublishSubject<T extends AbstractStepExecutionInfo> afterStepExecutionFailurePublisher which notifies all subjects after failed step executions.
-
-
Constructor Details
-
QtafTestNGAnnotatedMethodInterceptor
protected QtafTestNGAnnotatedMethodInterceptor(rx.subjects.PublishSubject<T> beforeStepExecution, rx.subjects.PublishSubject<T> afterStepExecutionSuccess, rx.subjects.PublishSubject<T> afterStepExecutionFailure) Return a QtafTestNGAnnotatedMethodInterceptor Object.- Parameters:
beforeStepExecution- Subject that emits events before a step is executedafterStepExecutionSuccess- Subject that emits events after a step was executed successfullyafterStepExecutionFailure- Subject that emits events after a step failed
-
-
Method Details
-
invoke
This method works as a proxy for methods. Instead of executing the annotated method directly this method will be executed.- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Parameters:
methodInvocation- Invoked method- Returns:
- Method execution result
- Throws:
Throwable- Error
-
onInvoke
protected abstract void onInvoke(org.aopalliance.intercept.MethodInvocation methodInvocation) Code to execute just before method invocation.- Parameters:
methodInvocation- the pending method invocation
-