Class AttachesScreenshotAspect
- java.lang.Object
-
- dev.aherscu.qa.jgiven.commons.utils.AttachesScreenshotAspect
-
public class AttachesScreenshotAspect extends Object
Monitors execution of methods ofMayAttachScreenshots
derivatives which are annotated byAttachesScreenshot
and callsMayAttachScreenshots.attaching_screenshot()
just before method returns even if there was a failure.
-
-
Field Summary
Fields Modifier and Type Field Description static int
screenshotDelayMs
static boolean
screenshots
-
Constructor Summary
Constructors Constructor Description AttachesScreenshotAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
aroundScreenshottingMethod(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint)
Attaches a screenshot even if the advised method failed.void
mayAttachScreenshots()
Matches the execution of any method within a sub-type ofMayAttachScreenshots
.void
screenshottingMethod()
Matches the execution of any method annotated withAttachesScreenshot
.
-
-
-
Method Detail
-
aroundScreenshottingMethod
public Object aroundScreenshottingMethod(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint) throws Throwable
Attaches a screenshot even if the advised method failed.- Parameters:
thisJoinPoint
- advised join point- Returns:
- forwarded from advised method
- Throws:
Throwable
- re-thrown as received advised method- See Also:
mayAttachScreenshots()
,screenshottingMethod()
-
mayAttachScreenshots
public void mayAttachScreenshots()
Matches the execution of any method within a sub-type ofMayAttachScreenshots
.
-
screenshottingMethod
public void screenshottingMethod()
Matches the execution of any method annotated withAttachesScreenshot
.
-
-