IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.services
Class TestScriptServicesLog

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.TestScriptServicesLog
All Implemented Interfaces:
ILog, ISimpleLog

public class TestScriptServicesLog
extends LogExtensionAdapter

This log implementation interfaces with the Test Script Services (TSS). The log is then available for other Rational products to use/view.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.rational.test.ft.services.LogExtensionAdapter
LogExtensionAdapter.ImageMetadata
 
Field Summary
 
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
PROP_ACTUAL, PROP_ADDITIONAL_INFO, PROP_APPLICATION, PROP_APPTYPE, PROP_ARGUMENTS, PROP_ASSIGNEDVARIABLE_NAME, PROP_BASELINE, PROP_BUFFERED_SNAPSHOT, PROP_DATAPOOL_STORE, 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_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
TestScriptServicesLog()
          Create an object which writes to the TSS log
 
Method Summary
 void closeLog()
          This method closes the connection to TSS and also brings up LogViewer.
 java.lang.String getLogDirectory()
          Return the directory the log and VP files are written to.
 double getTimerAndEnd(java.lang.String name, java.lang.String language)
          gets the timer value for the given timer
 void initLog()
          Open a TSS log
 boolean openLogViewer()
          The callback function to open the viewer for the log.
 void setLogBuild(java.lang.String logBuild)
          Set the Test Manager log build name
 void setLogFolder(java.lang.String logFolder)
          Set the Test Manager log folder
 void setPassword(java.lang.String password)
          Set the Test Manager user password
 void setProject(java.lang.String project)
          Set the Test Manager project
 void setUserName(java.lang.String userName)
          Set the Test Manager login user name
 void timerEnd(java.lang.String name, java.lang.String language)
          Stop a timer.
 void timerStart(java.lang.String name, java.lang.String language)
          Start a timer.
 boolean viewerKnowsHowToBringUpComparator()
          This answers yes/no whether the log-viewer associated with this log knows how to bring up our comparator.
 void writeLog(ILogMessage logMsg)
          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, getLogFilename, getScriptName, getTimestamp, open, persistImage, scriptEnd, scriptStart, setLogDirectory, setLogName, write, write
 
Methods inherited from class com.rational.test.ft.services.LogAdapter
createApplicationStartMessage, createAssignActionMessage, createGUIActionMessage, createGUIActionMessage, createMessage, createMessage, createTimerEndMessage, ensureLogDirectory, getCurrentDatapool, getCurrentLogFilter, getCurrentScriptResult, getLastScriptResult, getLogName, getLogType, getNextUserSnapshotName, getNextUserSnapshotNumber, getScreenShotFile, getScriptPlaybackParams, getTestResult, getTimerValue, info, isLoggingEnabled, isLogGuiActionEnabled, isLogScreenSnapshotActionEnabled, logRootException, setCurrentLogFilter, setLogGUIAction, setLogScreenSnapshotAction, setLogType, setScriptPlaybackParams, setTopResult, shouldBringUpLog, writeGUIAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestScriptServicesLog

public TestScriptServicesLog()
Create an object which writes to the TSS log

Method Detail

initLog

public void initLog()
             throws LogException
Open a TSS log

Specified by:
initLog in class LogExtensionAdapter
Throws:
LogException

closeLog

public void closeLog()
This method closes the connection to TSS and also brings up LogViewer.

Specified by:
closeLog in class LogExtensionAdapter

writeLog

public void writeLog(ILogMessage logMsg)
              throws LogException
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
Throws:
LogException - Something went wrong when logging the event
Parameters:
message - The message (i.e. resultCode, eventCode, note, and details)

getLogDirectory

public java.lang.String getLogDirectory()
Return the directory the log and VP files are written to. Note: log and VP directories may need to be split at a later date as we may not be in control of where they are written once we hook up with TestManager.

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

setUserName

public void setUserName(java.lang.String userName)
Set the Test Manager login user name


setPassword

public void setPassword(java.lang.String password)
Set the Test Manager user password


setProject

public void setProject(java.lang.String project)
Set the Test Manager project


setLogBuild

public void setLogBuild(java.lang.String logBuild)
Set the Test Manager log build name


setLogFolder

public void setLogFolder(java.lang.String logFolder)
Set the Test Manager log folder


timerStart

public void timerStart(java.lang.String name,
                       java.lang.String language)
Start a timer. This calls the underlying TSS method to start a timer, This overrides the timerStart() method in LogAdapter.java.

Specified by:
timerStart in interface ILog
Overrides:
timerStart in class LogExtensionAdapter
Parameters:
name - The timer name.
language - The language used for the script ( i.e. java )

timerEnd

public void timerEnd(java.lang.String name,
                     java.lang.String language)
Stop a timer. This calls the underlying TSS method to stop the timer, This overrides the timerEnd method in LogAdapter.java.

Specified by:
timerEnd in interface ILog
Overrides:
timerEnd in class LogExtensionAdapter
Parameters:
name - The timer name.
language - The language used for the script ( i.e. java )

getTimerAndEnd

public double getTimerAndEnd(java.lang.String name,
                             java.lang.String language)
gets the timer value for the given timer

Specified by:
getTimerAndEnd in interface ILog
Overrides:
getTimerAndEnd in class LogAdapter
Parameters:
name - The timer name.
language - The language used for the script ( i.e. java )
Returns:
timerValue The timer value.

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

openLogViewer

public boolean openLogViewer()
The callback function to open the viewer for the log. Overwrite to open the log at the end of the playback.

Specified by:
openLogViewer in interface ISimpleLog
Overrides:
openLogViewer in class SimpleLogAdapter
Returns:
true, on successfull opening of log viewer, false otherwise