public class CaptureScreenshotListener
extends org.junit.runner.notification.RunListener
RunListener and captures a screenshot when a test fails.
It writes the screenshot into the output directory configured for the maven surefire plugin. The location of this directory
is exposed via the system property 'reportsDirectory' by the AMPS IntegrationTestMojo.
It will only take a screenshot if the browser is FireFox. Selenium requires for IE a plugin to be able to take screenshots.| Constructor and Description |
|---|
CaptureScreenshotListener() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createSreenshotFileName(org.junit.runner.Description description) |
void |
testFailure(org.junit.runner.notification.Failure failure) |
public void testFailure(org.junit.runner.notification.Failure failure)
throws Exception
testFailure in class org.junit.runner.notification.RunListenerExceptionprotected String createSreenshotFileName(org.junit.runner.Description description)
Copyright © 2015 Atlassian. All rights reserved.