|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rational.test.ft.services.SimpleLogAdapter
com.rational.test.ft.services.LogAdapter
com.rational.test.ft.services.LogExtensionAdapter
public abstract class LogExtensionAdapter
This is the base class for all Rational Functional Tester log extensions
Implementors should only write the following methods to get the desired log results they wish to design.
public void initLog()
public void closeLog()
public void writeLog(ILogMessage message)
Sample implementation of the subclass is shown below to get the sample text log output of a sample script
Sample Text Log
July 23, 2007 8:30:12 PM IST :Script Name Script1.java Result :INFO Event SCRIPT START headlind Script start [Script1]
Property Name =line_number Property Value =1
Property Name =script_name Property Value =Script1
Property Name =script_id Property Value =Script1.java
July 23, 2007 8:30:12 PM IST :Script Name Script1.java Result :PASS Event SCRIPT END headlind Script end [Script1]
Property Name =line_number Property Value =-1
Property Name =script_name Property Value =Script1
Property Name =script_id Property Value =Script1.java
| Nested Class Summary | |
|---|---|
protected class |
LogExtensionAdapter.ImageMetadata
|
| Field Summary | |
|---|---|
protected float |
MAX_IMAGE_DIMENSION
|
| Fields inherited from class com.rational.test.ft.services.LogAdapter |
|---|
spaceDelimeter |
| Fields inherited from interface com.rational.test.ft.services.ISimpleLog |
|---|
DISABLE_LOGGING, EVENT_APPLICATION_END, EVENT_APPLICATION_START, EVENT_APPLICATON_ACTION, EVENT_CALL_SCRIPT, EVENT_CONFIGURATION, EVENT_GENERAL, EVENT_SCRIPT_END, EVENT_SCRIPT_START, EVENT_TIMER_END, EVENT_TIMER_START, EVENT_VP, LOG_DISABLE_GUI_ACTION, LOG_ENABLE_GUI_ACTION, LOG_FAILURE, LOG_FAILURES, LOG_FAILURES_WARNINGS, LOG_FAILURES_WARNINGS_PASS, LOG_FAILURES_WARNINGS_PASS_INFO, LOG_INFORMATION, LOG_PASS, LOG_WARNING |
| Constructor Summary | |
|---|---|
LogExtensionAdapter()
|
|
LogExtensionAdapter(java.lang.String logName)
|
|
| Method Summary | |
|---|---|
void |
applicationStart(java.lang.String name,
int status,
java.lang.String description,
java.lang.String language)
Writes an application start message into the log. |
void |
applicationStart(java.lang.String name,
java.lang.String language)
Write an application start message into the log. |
void |
callScript(java.lang.String name,
java.lang.String language)
Write a call script message into the log |
void |
close()
Closes the log, thereby releasing internal resources. |
abstract void |
closeLog()
The abstract method that needs to be overridden by sub classes to close their custom logs |
void |
configuration(java.lang.String language)
Write the system configuration into the log. |
ILogMessage |
createApplicationStartMessage(java.lang.String name,
int status,
java.lang.String description,
java.lang.String language)
Return a application start message. |
ILogMessage |
createConfigurationMessage(java.lang.String language)
Create a system configuration message. |
ILogMessage |
createTestResultMessage(java.lang.String headline,
boolean passed,
java.lang.String additionalInfo)
Creates a test result message. |
ILogMessage |
createTimerEndMessage(java.lang.String name,
java.lang.String language)
Return an end timer message. |
ILogMessage |
createTimerStartMessage(java.lang.String name,
java.lang.String language)
Return a start timer message. |
ILogMessage |
createVPMessage(int resultCode,
java.lang.String type,
java.lang.String name,
java.lang.String language)
Return a verification point message. |
void |
exception(java.lang.String note,
java.lang.String context,
java.lang.String throwableName,
java.lang.String throwableMessage,
java.lang.String scriptName,
int line,
java.lang.String stackTrace,
java.lang.String language)
Write an exception message. |
void |
exception(java.lang.String note,
java.lang.String context,
java.lang.String throwableName,
java.lang.String throwableMessage,
java.lang.String scriptName,
int line,
java.lang.String stackTrace,
java.lang.String language,
java.awt.image.BufferedImage screenSnapshot)
Write an exception message. |
java.lang.String |
getLogFilename()
Returns the log file for the log. |
java.lang.String |
getScriptName()
Return the script name that has initiated the playback of the script |
static java.lang.String |
getTimestamp()
Gets the current locale timestamp that can be logged |
abstract void |
initLog()
The abstract method that needs to be overridden by the sub classes to initialize their custom logs |
void |
open()
Opens the log and initializes internal resources. |
protected void |
persistImage(ILogMessage message)
Persist the screen snap shot if present in the message |
void |
scriptEnd(java.lang.String name,
java.lang.String language)
Write a script end message into the log |
void |
scriptStart(java.lang.String name,
java.lang.String language)
Write a script start message into the log |
void |
setLogDirectory(java.lang.String logDirectory)
Sets the directory the log is beging written to. |
void |
setLogName(java.lang.String log_Name)
Sets the log name the log is beging written to. |
void |
timerEnd(java.lang.String name,
java.lang.String language)
Write an end timer message into the log. |
void |
timerStart(java.lang.String name,
java.lang.String language)
Write a start timer message into the log. |
void |
write(ILogMessage message)
Perform internal tasks to write log messages. |
void |
write(int resultCode,
int eventCode,
java.lang.String note)
Perform internal write tasks that should not called by extenders/implementors. |
abstract void |
writeLog(ILogMessage message)
The abstract method that needs to be overridden by sub classes to handle the log events in the form of ILogMessage |
| Methods inherited from class com.rational.test.ft.services.SimpleLogAdapter |
|---|
openLogViewer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.rational.test.ft.services.ISimpleLog |
|---|
openLogViewer |
| Field Detail |
|---|
protected final float MAX_IMAGE_DIMENSION
| Constructor Detail |
|---|
public LogExtensionAdapter(java.lang.String logName)
public LogExtensionAdapter()
| Method Detail |
|---|
protected void persistImage(ILogMessage message)
message - The message that is to be loggedpublic final void write(ILogMessage message)
write in interface ISimpleLogwrite in class SimpleLogAdaptermessage - The message that is to be loggedISimpleLog.LOG_FAILURE,
ISimpleLog.LOG_PASS,
ISimpleLog.LOG_WARNING,
ISimpleLog.LOG_INFORMATION,
ISimpleLog.EVENT_SCRIPT_START,
ISimpleLog.EVENT_SCRIPT_END,
ISimpleLog.EVENT_VP,
ISimpleLog.EVENT_CALL_SCRIPT,
ISimpleLog.EVENT_APPLICATION_START,
ISimpleLog.EVENT_APPLICATION_END,
ISimpleLog.EVENT_TIMER_START,
ISimpleLog.EVENT_TIMER_END,
ISimpleLog.EVENT_CONFIGURATION,
ISimpleLog.EVENT_GENERAL
public final void write(int resultCode,
int eventCode,
java.lang.String note)
write in interface ISimpleLogwrite in class SimpleLogAdaptermessage - The message that is to be loggedISimpleLog.LOG_FAILURE,
ISimpleLog.LOG_PASS,
ISimpleLog.LOG_WARNING,
ISimpleLog.LOG_INFORMATION,
ISimpleLog.EVENT_SCRIPT_START,
ISimpleLog.EVENT_SCRIPT_END,
ISimpleLog.EVENT_VP,
ISimpleLog.EVENT_CALL_SCRIPT,
ISimpleLog.EVENT_APPLICATION_START,
ISimpleLog.EVENT_APPLICATION_END,
ISimpleLog.EVENT_TIMER_START,
ISimpleLog.EVENT_TIMER_END,
ISimpleLog.EVENT_CONFIGURATION,
ISimpleLog.EVENT_GENERALpublic final void setLogDirectory(java.lang.String logDirectory)
setLogDirectory in class LogAdapterpublic final void setLogName(java.lang.String log_Name)
setLogName in class LogAdapter
public final void scriptStart(java.lang.String name,
java.lang.String language)
scriptStart in interface ILogscriptStart in class LogAdaptername - The script name.language - The language used for the script ( i.e. java )
public final void scriptEnd(java.lang.String name,
java.lang.String language)
scriptEnd in interface ILogscriptEnd in class LogAdaptername - The script name.language - The language used for the script ( i.e. java )
public final void callScript(java.lang.String name,
java.lang.String language)
callScript in interface ILogcallScript in class LogAdaptername - The script being called.language - The language used for the script ( i.e. java )
public final void applicationStart(java.lang.String name,
java.lang.String language)
applicationStart in interface ILogapplicationStart in class LogAdaptername - The application's name.language - The language used for the script ( i.e. java )
public final void applicationStart(java.lang.String name,
int status,
java.lang.String description,
java.lang.String language)
applicationStart in interface ILogapplicationStart in class LogAdaptername - The application's namestatus - Result of starting the application
(@see ISimpleLog.LOG_FAILUREdescription - Additional text for the status
(e.g. reason for failure)language - The language used for the script ( i.e. java )ISimpleLog.LOG_WARNING,
ISimpleLog.LOG_INFORMATION
public final ILogMessage createApplicationStartMessage(java.lang.String name,
int status,
java.lang.String description,
java.lang.String language)
createApplicationStartMessage in interface ILogcreateApplicationStartMessage in class LogAdaptername - The application's name.status - Result of starting the application
(@see ISimpleLog.LOG_FAILUREdescription - Additional text for the status
(e.g. reason for failure)language - The language used for the script ( i.e. java )
ISimpleLog.LOG_WARNING,
ISimpleLog.LOG_INFORMATION
public void timerStart(java.lang.String name,
java.lang.String language)
timerStart in interface ILogtimerStart in class LogAdaptername - The timer name.language - The language used for the script ( i.e. java )
public final ILogMessage createTimerStartMessage(java.lang.String name,
java.lang.String language)
createTimerStartMessage in interface ILogcreateTimerStartMessage in class LogAdaptername - The timer name.language - The language used for the script ( i.e. java )
public void timerEnd(java.lang.String name,
java.lang.String language)
timerEnd in interface ILogtimerEnd in class LogAdaptername - The timer name.language - The language used for the script ( i.e. java )
public final ILogMessage createTimerEndMessage(java.lang.String name,
java.lang.String language)
createTimerEndMessage in interface ILogcreateTimerEndMessage in class LogAdaptername - The timer name.language - The language used for the script ( i.e. java )
public final ILogMessage createVPMessage(int resultCode,
java.lang.String type,
java.lang.String name,
java.lang.String language)
createVPMessage in interface ILogcreateVPMessage in class LogAdapterresultCode - One of the ILog.LOG_ codes.type - One of the VP_TYPE_ codes.name - The verification point name.language - The language used for the script ( i.e. java )
public final void configuration(java.lang.String language)
configuration in interface ILogconfiguration in class LogAdapterlanguage - The language used for the script ( i.e. java )public final ILogMessage createConfigurationMessage(java.lang.String language)
createConfigurationMessage in interface ILogcreateConfigurationMessage in class LogAdapterlanguage - The language used for the script ( i.e. java )
public final void exception(java.lang.String note,
java.lang.String context,
java.lang.String throwableName,
java.lang.String throwableMessage,
java.lang.String scriptName,
int line,
java.lang.String stackTrace,
java.lang.String language)
exception in interface ILogexception in class LogAdapter
public final void exception(java.lang.String note,
java.lang.String context,
java.lang.String throwableName,
java.lang.String throwableMessage,
java.lang.String scriptName,
int line,
java.lang.String stackTrace,
java.lang.String language,
java.awt.image.BufferedImage screenSnapshot)
exception in interface ILogexception in class LogAdapter
public final ILogMessage createTestResultMessage(java.lang.String headline,
boolean passed,
java.lang.String additionalInfo)
createTestResultMessage in interface ILogcreateTestResultMessage in class LogAdapterheadline - The headline describing the testpassed - A boolean indicating if the test
passed or failed.additionalInfo - Additional information about the testpublic static final java.lang.String getTimestamp()
public void open()
open in interface ISimpleLogopen in class SimpleLogAdapterpublic void close()
close in interface ISimpleLogclose in class SimpleLogAdapterpublic java.lang.String getLogFilename()
getLogFilename in interface ILoggetLogFilename in class LogAdapterpublic final java.lang.String getScriptName()
public abstract void initLog()
throws LogException
LogExceptionpublic abstract void closeLog()
public abstract void writeLog(ILogMessage message)
message - The log Message Structure that contains information of log events and properties
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||