IBM Rational Functional Tester
Version 8.2.1
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.services
Class ExecutionHistoryLog

java.lang.Object
  extended by com.rational.test.ft.services.SimpleLogAdapter
      extended by com.rational.test.ft.services.LogAdapter
          extended by com.rational.test.ft.services.LogExtensionAdapter
              extended by com.rational.test.ft.services.ExecutionHistoryLog
All Implemented Interfaces:
ILog, ISimpleLog

public class ExecutionHistoryLog
extends LogExtensionAdapter

Controls output of log messages into a Hyades Execution History stream. This output is generated in several ways:

If executed by Hyades we use the first option and if not generate the history locally, similar to HTML log generation.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.services.LogExtensionAdapter
LogExtensionAdapter.ImageMetadata
 
Field Summary
static java.lang.String[] RftExecutionHistoryEventTypes
           
 
Fields inherited from class com.rational.test.ft.services.LogExtensionAdapter
MAX_IMAGE_DIMENSION
 
Fields inherited from class com.rational.test.ft.services.LogAdapter
spaceDelimeter
 
Fields inherited from interface com.rational.test.ft.services.ILog
KEY_POST_EXECUTION_END_MESSAGE, KEY_PRE_EXECUTION_START_MESSAGE, MASKED_PROP_GUI_ACTION_METHOD_ARGS, MASKED_PROP_GUI_ACTION_METHOD_NAME, PROP_ACTUAL, PROP_ADDITIONAL_INFO, PROP_APPLICATION, PROP_APPTYPE, PROP_ARGUMENTS, PROP_ASSIGNEDVARIABLE_NAME, PROP_BASELINE, PROP_BUFFERED_SNAPSHOT, PROP_DATAPOOL_STORE, PROP_DEFAULT_SCRIPT_DATAPOOL_NAME, PROP_ELAPSED_TIME, PROP_EXCEPTION_CONTEXT, PROP_EXCEPTION_MESSAGE, PROP_EXCEPTION_NAME, PROP_EXCEPTION_STACK, PROP_EXECUTABLE, PROP_EXPECTED, PROP_FAILURE_DESCRIPTION, PROP_ITERATION_COUNT, PROP_LINENUMBER, PROP_NAME, PROP_PROPERTY_NAME, PROP_PROPERTY_VALUE, PROP_SCREEN_SNAPSHOT, PROP_SCRIPT_ID, PROP_SCRIPT_NAME, PROP_SCRIPT_SOURCE_UID, PROP_SIMPLIFIEDSCRIPT_GRPNAME, PROP_SIMPLIFIEDSCRIPT_LINE, PROP_SIMPLIFIEDSCRIPT_LINENUMBER, PROP_TESTCASE_DESCRIPTION, PROP_TESTCASE_NAME, PROP_USER_SCREEN_SNAPSHOT, PROP_VP_TYPE, PROP_WORKINGDIRECTORY, SCREEN_SNAPSHOT_FILE_BASE, SCREEN_SNAPSHOT_FILE_EXT, SCREEN_SNAPSHOT_FILE_NAME, USER_SCREEN_SNAPSHOT_FILE_BASE, VP_TYPE_ALPHA_NUM, VP_TYPE_CLIPBOARD, VP_TYPE_FILE_COMPARE, VP_TYPE_FILE_EXIST, VP_TYPE_FULL_IMAGE, VP_TYPE_MENU, VP_TYPE_MODULE_EXIST, VP_TYPE_OBJECT_DATA, VP_TYPE_OBJECT_PROP, VP_TYPE_OCR_IMAGE, VP_TYPE_REGION_IMAGE, VP_TYPE_WEBSITE_COMPARE, VP_TYPE_WEBSITE_SCAN, VP_TYPE_WINDOW_EXIST, VP_TYPE_WINDOW_IMAGE
 
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_CUSTOM, EVENT_EXPORT, EVENT_GENERAL, EVENT_SCRIPT_END, EVENT_SCRIPT_START, EVENT_TIMER_END, EVENT_TIMER_START, EVENT_VP, LOG_DISABLE_GUI_ACTION, LOG_DISABLE_GUI_SNAPSHOT_ACTION, LOG_ENABLE_GUI_ACTION, LOG_ENABLE_GUI_SNAPSHOT_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
ExecutionHistoryLog()
           
ExecutionHistoryLog(IExecutionHistoryLog executionHistory)
          Construct an Execution History type object.
ExecutionHistoryLog(java.lang.String project, java.lang.String script, java.lang.String logName, java.lang.String logDirectory)
          Construct an Execution History type object.
 
Method Summary
 void closeLog()
          This method closes the html file.
static ExecutionHistoryLog getActiveLog()
           
 java.lang.String getLogFilename()
          Returns the name of the log filename including the file extension but no directory.
 void initLog()
          This method opens an html file with the specified name.
 void setPrintDateTime(boolean print)
          Set whether to print the date/time in the log entry
 boolean viewerKnowsHowToBringUpComparator()
          This answers yes/no whether the log-viewer associated with this log knows how to bring up our comparator.
 void writeLog(ILogMessage message)
          Write a message into the log.
 
Methods inherited from class com.rational.test.ft.services.LogExtensionAdapter
applicationStart, applicationStart, callScript, close, configuration, createApplicationStartMessage, createConfigurationMessage, createTestResultMessage, createTimerEndMessage, createTimerStartMessage, createVPMessage, exception, exception, getTimestamp, open, persistImage, scriptEnd, scriptStart, setLogDirectory, setLogName, timerEnd, timerStart, write, write
 
Methods inherited from class com.rational.test.ft.services.LogAdapter
appendLogProperties, createApplicationStartMessage, createAssignActionMessage, createGUIActionMessage, createGUIActionMessage, createLogParticipantMessage, createMessage, createMessage, createTimerEndMessage, ensureLogDirectory, getCurrentDatapool, getCurrentLogFilter, getCurrentScriptResult, getLastScriptResult, getLogDirectory, getLogName, getLogType, getNextUserSnapshotName, getNextUserSnapshotNumber, getScreenShotFile, getScriptName, getScriptPlaybackParams, getSimplifiedScriptElement, getSSGroupForLine, getSummaryEvent, getTestResult, getTimerAndEnd, getTimerValue, info, isLoggingEnabled, isLogGuiActionEnabled, isLogScreenSnapshotActionEnabled, logRootException, processPostGuiAction, processPreGuiAction, setCurrentLogFilter, setLogGUIAction, setLogScreenSnapshotAction, setLogType, setScriptPlaybackParams, setTopResult, shouldBringUpLog, timerEnd, writeGUIAction
 
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

RftExecutionHistoryEventTypes

public static final java.lang.String[] RftExecutionHistoryEventTypes
Constructor Detail

ExecutionHistoryLog

public ExecutionHistoryLog()

ExecutionHistoryLog

public ExecutionHistoryLog(java.lang.String project,
                           java.lang.String script,
                           java.lang.String logName,
                           java.lang.String logDirectory)
Construct an Execution History type object.

Parameters:
script - The script name (optionally includes package(s))
logname - The subdirectory under logs we will write to (defaults to scriptname if null is passed)

ExecutionHistoryLog

public ExecutionHistoryLog(IExecutionHistoryLog executionHistory)
Construct an Execution History type object.

Parameters:
script - The script name (optionally includes package(s))
logname - The subdirectory under logs we will write to (defaults to scriptname if null is passed)
Method Detail

getActiveLog

public static ExecutionHistoryLog getActiveLog()

getLogFilename

public java.lang.String getLogFilename()
Returns the name of the log filename including the file extension but no directory.

Specified by:
getLogFilename in interface ILog
Overrides:
getLogFilename in class LogExtensionAdapter
Returns:
Return an empty string
Since:
RFT2.0

initLog

public void initLog()
             throws LogException
This method opens an html file with the specified name. If this file can not be opened then java.io.IOException is thrown.

Specified by:
initLog in class LogExtensionAdapter
Throws:
LogException
Parameters:
fileName - The name of the html file.

closeLog

public void closeLog()
This method closes the html file.

Specified by:
closeLog in class LogExtensionAdapter

setPrintDateTime

public void setPrintDateTime(boolean print)
Set whether to print the date/time in the log entry

Parameters:
print - Whether to print the date/time.

writeLog

public void writeLog(ILogMessage message)
Write a message into the log. This interface allows a message with a detailed description to be set in the log file (i.e. name/value pairs).

Specified by:
writeLog in class LogExtensionAdapter
Parameters:
message - The message (i.e. resultCode, eventCode, note, and details)

viewerKnowsHowToBringUpComparator

public boolean viewerKnowsHowToBringUpComparator()
This answers yes/no whether the log-viewer associated with this log knows how to bring up our comparator. The answer is true for TSS log, and false otherwise. This is used to decide whether to do our own bring-up-comparator after playback.

Specified by:
viewerKnowsHowToBringUpComparator in interface ILog
Overrides:
viewerKnowsHowToBringUpComparator in class LogAdapter