Search in sources :

Example 1 with ScreenshotCaptureListener

use of org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener in project xtext-xtend by eclipse.

the class ParameterizedSWTBotRunner method run.

@Override
public void run(RunNotifier notifier) {
    RunListener failureSpy = new ScreenshotCaptureListener();
    // remove existing listeners that could be added by suite or class runners
    notifier.removeListener(failureSpy);
    notifier.addListener(failureSpy);
    try {
        super.run(notifier);
    } finally {
        notifier.removeListener(failureSpy);
    }
}
Also used : ScreenshotCaptureListener(org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener) RunListener(org.junit.runner.notification.RunListener)

Aggregations

ScreenshotCaptureListener (org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener)1 RunListener (org.junit.runner.notification.RunListener)1