-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.interceptors.watcher.testcase.TestContextHolder,com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor
public final class TestRunnerScreenshotWatcherInterceptor implements TestRunWatcherInterceptor
The implementation of the TestRunWatcherInterceptor interface. Takes screenshots if "before" or "after" sections failed.
-
-
Constructor Summary
Constructors Constructor Description TestRunnerScreenshotWatcherInterceptor(Screenshots screenshots)
-
Method Summary
Modifier and Type Method Description UnitonTestStarted(TestInfo testInfo)UnitonAfterSectionFinishedFailed(TestInfo testInfo, Throwable throwable)Takes a screenshot of the screen on which the "after" section failed. UnitonBeforeSectionFinishedFailed(TestInfo testInfo, Throwable throwable)Takes a screenshot of the screen on which the "before" section failed. -
Methods inherited from class com.kaspersky.kaspresso.interceptors.watcher.testcase.impl.screenshot.TestRunnerScreenshotWatcherInterceptor
onAfterSectionFinishedSuccess, onAfterSectionStarted, onBeforeSectionFinishedSuccess, onBeforeSectionStarted, onMainSectionFinishedFailed, onMainSectionFinishedSuccess, onMainSectionStarted, onTestFinished -
Methods inherited from class com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor
setBaseTestContext -
Methods inherited from class com.kaspersky.kaspresso.interceptors.watcher.testcase.TestContextHolder
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TestRunnerScreenshotWatcherInterceptor
TestRunnerScreenshotWatcherInterceptor(Screenshots screenshots)
-
-
Method Detail
-
onTestStarted
Unit onTestStarted(TestInfo testInfo)
-
onAfterSectionFinishedFailed
Unit onAfterSectionFinishedFailed(TestInfo testInfo, Throwable throwable)
Takes a screenshot of the screen on which the "after" section failed.
- Parameters:
testInfo- the test info to use in screenshots name.throwable- the error occurred to use in screenshots name.
-
onBeforeSectionFinishedFailed
Unit onBeforeSectionFinishedFailed(TestInfo testInfo, Throwable throwable)
Takes a screenshot of the screen on which the "before" section failed.
- Parameters:
testInfo- the test info to use in screenshots name.throwable- the error occurred to use in screenshots name.
-
-
-
-