public class EventLoggerRule extends org.junit.rules.TestWatcher implements EventLogger
| Constructor and Description |
|---|
EventLoggerRule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finished(org.junit.runner.Description description) |
void |
log(java.lang.String action,
java.lang.String message)
Logs the event.
|
void |
log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1)
Logs the event.
|
void |
log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2)
Logs the event.
|
void |
log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2,
java.lang.Object argument3)
Logs the event.
|
void |
log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2,
java.lang.Object argument3,
java.lang.Object argument4)
Logs the event.
|
void |
logAssertionError(java.lang.AssertionError assertionError)
Log an assertion-error, with a screenshot.
|
void |
logThrowable(java.lang.Throwable exception)
Log an exception, with a screenshot.
|
EventLogger |
onDebug()
Deliver a eventlogger with
Priority.DEBUG. |
EventLogger |
onDoku()
Deliver a eventlogger with
Priority.DOCUMENTATION. |
EventLogger |
onException()
Deliver a eventlogger with
Priority.EXCEPTION. |
EventLogger |
onFailure()
Deliver a eventlogger with
Priority.FAILURE. |
protected void |
starting(org.junit.runner.Description d) |
boolean |
willLogged()
Return if a message will be logged.
|
boolean |
willScreenshotLogged(Priority priority)
Return if a screenshot will created.
|
EventLogger |
withScreenshot(Priority prio,
org.openqa.selenium.WebDriver webDriver)
Define that the log should be done with screenshot if priority higher
then the threshold.
|
protected void starting(org.junit.runner.Description d)
starting in class org.junit.rules.TestWatcherprotected void finished(org.junit.runner.Description description)
finished in class org.junit.rules.TestWatcherpublic EventLogger onDebug()
Priority.DEBUG.Priority.DEBUG.public EventLogger onDoku()
Priority.DOCUMENTATION.Priority.DOCUMENTATION.public EventLogger onFailure()
Priority.FAILURE.Priority.FAILURE.public EventLogger onException()
Priority.EXCEPTION.Priority.EXCEPTION.public void logAssertionError(java.lang.AssertionError assertionError)
EventLoggerPriority.FAILURE.logAssertionError in interface EventLoggerassertionError - the assertionError.public void logThrowable(java.lang.Throwable exception)
EventLoggerPriority.EXCEPTION.logThrowable in interface EventLoggerexception - the exception.public EventLogger withScreenshot(Priority prio, org.openqa.selenium.WebDriver webDriver)
EventLoggerwithScreenshot in interface EventLoggerprio - priority for the screenshot.webDriver - the webdriver.public void log(java.lang.String action,
java.lang.String message)
EventLoggerlog in interface EventLoggeraction - the action @see EventActions.message - the message.public void log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1)
EventLoggerlog in interface EventLoggeraction - the action @see EventActions.message - the message.argument1 - argument 1 for the message.public void log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2)
EventLoggerlog in interface EventLoggeraction - the action @see EventActions.message - the message.argument1 - argument 1 for the message.argument2 - argument 2 for the message.public void log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2,
java.lang.Object argument3)
EventLoggerlog in interface EventLoggeraction - the action @see EventActions.message - the message.argument1 - argument 1 for the message.argument2 - argument 2 for the message.argument3 - argument 3 for the message.public void log(java.lang.String action,
java.lang.String message,
java.lang.Object argument1,
java.lang.Object argument2,
java.lang.Object argument3,
java.lang.Object argument4)
EventLoggerlog in interface EventLoggeraction - the action @see EventActions.message - the message.argument1 - argument 1 for the message.argument2 - argument 2 for the message.argument3 - argument 3 for the message.argument4 - argument 4 for the message.public boolean willLogged()
EventLoggerwillLogged in interface EventLoggerpublic boolean willScreenshotLogged(Priority priority)
EventLoggerwillScreenshotLogged in interface EventLoggerpriority - the priority which with the screenshot should be created.Copyright © 2017 PPI AG. All rights reserved.