com.rational.test.ft.services

Class 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:
    • Redirected to an existing execution stream (created by Hyades)
    • Injected into a locally created history file
    If executed by Hyades we use the first option and if not generate the history locally, similar to HTML log generation.
    • 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

      • 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.
      • 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