Package at.willhaben.willtest.rule
Class ScreenshotRule
- java.lang.Object
-
- at.willhaben.willtest.rule.TestFailureAwareRule
-
- at.willhaben.willtest.rule.ScreenshotRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
@Deprecated public class ScreenshotRule extends TestFailureAwareRule
Deprecated.Creates a PNG screenshot if there is a test failure. Please note, that creating the screenshot is not instant when a failure happens. It happens a few milliseconds after the failure, and it can show a different state.
-
-
Constructor Summary
Constructors Constructor Description ScreenshotRule(SeleniumProvider seleniumProvider)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidonError(org.junit.runner.Description description, java.lang.Throwable testFailure)Deprecated.Called if the test has thrown an error.ScreenshotRulesetScreenshotGenerator(ScreenshotGenerator screenshotGenerator)Deprecated.-
Methods inherited from class at.willhaben.willtest.rule.TestFailureAwareRule
after, apply, before
-
-
-
-
Constructor Detail
-
ScreenshotRule
public ScreenshotRule(SeleniumProvider seleniumProvider)
Deprecated.
-
-
Method Detail
-
onError
protected void onError(org.junit.runner.Description description, java.lang.Throwable testFailure) throws java.lang.ThrowableDeprecated.Description copied from class:TestFailureAwareRuleCalled if the test has thrown an error. By default it does nothing.- Overrides:
onErrorin classTestFailureAwareRule- Parameters:
description- junit test description objecttestFailure- any error from the test- Throws:
java.lang.Throwable- this will be added totestFailureas suppressed exception. SeeThrowable.addSuppressed(Throwable)
-
setScreenshotGenerator
public ScreenshotRule setScreenshotGenerator(ScreenshotGenerator screenshotGenerator)
Deprecated.
-
-