|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.unitedinternet.portal.selenium.utils.logging.XmlResultFormatter
public class XmlResultFormatter
Formats all logging events as XML. Alternate formatter for logging. Be sure to pass an encoding-aware writer together with encoding name to the 2 parameters constuctor.
Constructor Summary | |
---|---|
XmlResultFormatter(java.io.Writer myResultsWriter)
Write results to the specified writer. |
|
XmlResultFormatter(java.io.Writer myResultsWriter,
java.lang.String myResultFileEncoding)
Write results with an arbitrary encoding. |
Method Summary | |
---|---|
void |
booleanCommandLogEvent(LoggingBean loggingBean)
Formats an selenium command which has an boolean result. |
void |
commandLogEvent(LoggingBean loggingBean)
Formats an selenium command. |
void |
commentLogEvent(LoggingBean loggingBean)
Format a comment. |
void |
footerLogEvent()
Like formatHeader() but here after all commands have been formatted. |
java.lang.String |
generateFilenameForAutomaticScreenshot(java.lang.String baseName)
Generate an absolute filename for taking screenshots in case of an error (eg. timed out wait). |
java.lang.String |
getAutomaticScreenshotPath()
Path to the (filesystem-)location where screenshot should be saved. |
java.lang.String |
getScreenShotBaseUri()
Base URI to be linked to in the result. |
void |
headerLogEvent(TestMetricsBean metricsBean)
Whatever the formatter wants to do before any command will be formatted. |
void |
methodLogEvent(LoggingBean loggingBean)
Formats a Log Event for a complete Test Method. |
void |
setAutomaticScreenshotPath(java.lang.String automaticScreenshotPath)
Path to the (filesystem-)location where screenshot should be saved. |
void |
setScreenShotBaseUri(java.lang.String screenShotBaseUri)
Set a special uri for screenshots. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlResultFormatter(java.io.Writer myResultsWriter)
myResultsWriter
- where results will be written in "ISO-8859-1" encodingpublic XmlResultFormatter(java.io.Writer myResultsWriter, java.lang.String myResultFileEncoding)
new BufferedWriter(new OutputStreamWriter(new FileOutputStream("myResultFile.html"),
"UTF-8")
myResultsWriter
- writer with resultFileEncoding set. See also Example abovemyResultFileEncoding
- any encoding supported by the running jvmMethod Detail |
---|
public void booleanCommandLogEvent(LoggingBean loggingBean)
booleanCommandLogEvent
in interface LoggingResultsFormatter
loggingBean
- containing all informations for logging a selenium commandpublic void commandLogEvent(LoggingBean loggingBean)
commandLogEvent
in interface LoggingResultsFormatter
loggingBean
- containing all informations for logging a selenium commandpublic void commentLogEvent(LoggingBean loggingBean)
commentLogEvent
in interface LoggingResultsFormatter
loggingBean
- loggingBean containing the comment to be logged.public void methodLogEvent(LoggingBean loggingBean)
methodLogEvent
in interface LoggingResultsFormatter
loggingBean
- containing all informations for logging a test method and its commandspublic void footerLogEvent()
footerLogEvent
in interface LoggingResultsFormatter
public java.lang.String generateFilenameForAutomaticScreenshot(java.lang.String baseName)
generateFilenameForAutomaticScreenshot
in interface LoggingResultsFormatter
baseName
- middle part of the name to be enhanced by whatever the implementation wants to
public java.lang.String getAutomaticScreenshotPath()
getAutomaticScreenshotPath
in interface LoggingResultsFormatter
public java.lang.String getScreenShotBaseUri()
getScreenShotBaseUri
in interface LoggingResultsFormatter
public void headerLogEvent(TestMetricsBean metricsBean)
headerLogEvent
in interface LoggingResultsFormatter
metricsBean
- metrics gathered during test-runpublic void setAutomaticScreenshotPath(java.lang.String automaticScreenshotPath)
setAutomaticScreenshotPath
in interface LoggingResultsFormatter
automaticScreenshotPath
- location (only path) to where screenshots should be savedpublic void setScreenShotBaseUri(java.lang.String screenShotBaseUri)
setScreenShotBaseUri
in interface LoggingResultsFormatter
screenShotBaseUri
- the new uri for screenshots
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |