-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.interceptors.watcher.testcase.TestContextHolder,com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor
public final class TestRunCompositeWatcherInterceptor implements TestRunWatcherInterceptor
The implementation of the TestRunWatcherInterceptor interface. Composes all of TestRunWatcherInterceptors list into one composite TestRunWatcherInterceptor that is actually called by com.kaspersky.kaspresso.testcases.core.TestRunner on each test event.
-
-
Constructor Summary
Constructors Constructor Description TestRunCompositeWatcherInterceptor(List<TestRunWatcherInterceptor> watcherInterceptors, Logger logger, List<Throwable> exceptions)
-
Method Summary
Modifier and Type Method Description UnitsetBaseTestContext(BaseTestContext context)UnitonTestStarted(TestInfo testInfo)Called on the whole test starts, delegates the interception to watcherInterceptors. UnitonBeforeSectionStarted(TestInfo testInfo)Called on "before" section starts, delegates the interception to watcherInterceptors. UnitonBeforeSectionFinishedSuccess(TestInfo testInfo)Called on "before" section finishes with success, delegates the interception to watcherInterceptors. UnitonBeforeSectionFinishedFailed(TestInfo testInfo, Throwable throwable)Called on "before" section finishes with failure, delegates the interception to watcherInterceptors. UnitonMainSectionStarted(TestInfo testInfo)Called on "main" section starts, delegates the interception to watcherInterceptors. UnitonMainSectionFinishedSuccess(TestInfo testInfo)Called on "main" section finishes with success, delegates the interception to watcherInterceptors. UnitonMainSectionFinishedFailed(TestInfo testInfo, Throwable throwable)Called on "main" section finishes with failure, delegates the interception to watcherInterceptors. UnitonAfterSectionStarted(TestInfo testInfo)Called on "after" section starts, delegates the interception to watcherInterceptors. UnitonAfterSectionFinishedSuccess(TestInfo testInfo)Called on "after" section finishes with success, delegates the interception to watcherInterceptors. UnitonAfterSectionFinishedFailed(TestInfo testInfo, Throwable throwable)Called on "after" section finishes with failure, delegates the interception to watcherInterceptors. UnitonTestFinished(TestInfo testInfo, Boolean success)Called on the whole test finishes, delegates the interception to watcherInterceptors. -
-
Constructor Detail
-
TestRunCompositeWatcherInterceptor
TestRunCompositeWatcherInterceptor(List<TestRunWatcherInterceptor> watcherInterceptors, Logger logger, List<Throwable> exceptions)
-
-
Method Detail
-
setBaseTestContext
Unit setBaseTestContext(BaseTestContext context)
-
onTestStarted
Unit onTestStarted(TestInfo testInfo)
Called on the whole test starts, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onBeforeSectionStarted
Unit onBeforeSectionStarted(TestInfo testInfo)
Called on "before" section starts, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onBeforeSectionFinishedSuccess
Unit onBeforeSectionFinishedSuccess(TestInfo testInfo)
Called on "before" section finishes with success, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onBeforeSectionFinishedFailed
Unit onBeforeSectionFinishedFailed(TestInfo testInfo, Throwable throwable)
Called on "before" section finishes with failure, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.throwable- the error occured to pass to watcherInterceptors.
-
onMainSectionStarted
Unit onMainSectionStarted(TestInfo testInfo)
Called on "main" section starts, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onMainSectionFinishedSuccess
Unit onMainSectionFinishedSuccess(TestInfo testInfo)
Called on "main" section finishes with success, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onMainSectionFinishedFailed
Unit onMainSectionFinishedFailed(TestInfo testInfo, Throwable throwable)
Called on "main" section finishes with failure, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.throwable- the error occured to pass to watcherInterceptors.
-
onAfterSectionStarted
Unit onAfterSectionStarted(TestInfo testInfo)
Called on "after" section starts, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onAfterSectionFinishedSuccess
Unit onAfterSectionFinishedSuccess(TestInfo testInfo)
Called on "after" section finishes with success, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.
-
onAfterSectionFinishedFailed
Unit onAfterSectionFinishedFailed(TestInfo testInfo, Throwable throwable)
Called on "after" section finishes with failure, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.throwable- the error occured to pass to watcherInterceptors.
-
onTestFinished
Unit onTestFinished(TestInfo testInfo, Boolean success)
Called on the whole test finishes, delegates the interception to watcherInterceptors.
- Parameters:
testInfo- the test info to pass to watcherInterceptors.success- the while test was finished successfully or not, to pass to watcherInterceptors.
-
-
-
-