com.rational.test.ft.services

Class LogManager

  • java.lang.Object
    • com.rational.test.ft.services.LogManager


  • public class LogManager
    extends java.lang.Object
    A collection of utility methods for managing the files created when a script is played.
    • Constructor Summary

      Constructors 
      Constructor and Description
      LogManager() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getBrowserCommand(java.lang.String htmlLog)
      Return the browser command to open the html Log
      static java.lang.String getBrowserCommandForNewUnifiedReport(java.lang.String log) 
      static java.lang.String getDatastoreFromLog(java.lang.String logstore) 
      static java.lang.String getDojoJSLocation()
      Return the dojo js location from the installation directory
      static java.lang.String getLinuxBrowserCommand()
      Utilty method to get a browser command that we can shell execute on Linux.
      static java.lang.String getLogFile(java.lang.String folderName) 
      static boolean hasLog(java.lang.String folderName)
      whether the folder is a log directory
      static boolean isInContainer()
      Returns true if the execution is on a container.
      static boolean isLogBrowserBased(java.lang.String logFileName)
      Returns true if the log dosen;t require the eclipse IDE, to open the log.
      static boolean openLog(java.lang.String logFilePath)
      Returns true if the log is of dojo type and got opened successfully, false otherwise
      static void removeScriptLogAssets(java.lang.String logFolder, java.lang.String logName, java.lang.String script)
      Remove script log assets (log file and VPs)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TRANSFORMATION_RESULT_FILE

        public static final java.lang.String TRANSFORMATION_RESULT_FILE
        See Also:
        Constant Field Values
      • DOJO_INSTALLATION_DIR

        public static final java.lang.String DOJO_INSTALLATION_DIR
        See Also:
        Constant Field Values
      • DOJO_WIDGET

        public static final java.lang.String DOJO_WIDGET
      • logFilenames

        public static final java.lang.String[] logFilenames
        These are the names of the log files we recognize. In versions 1.0 and 1.1 we used the short name (log.*) and from version 2.0 and on we use the longer name (rational_ft_log.*). These strings are also in the HtmlLog and TextLog (java AND cs versions). PurifyPlus uses the rational_ft_log.htm pattern to avoid instrumenting the browser acting as our log viewer. No change to this name should be made without first consulting the PurifyPlus team. At the time of this note (8-April-2003), the most knowledgeable contact is Dan Melinger.
    • Constructor Detail

      • LogManager

        public LogManager()
    • Method Detail

      • removeScriptLogAssets

        public static void removeScriptLogAssets(java.lang.String logFolder,
                                                 java.lang.String logName,
                                                 java.lang.String script)
        Remove script log assets (log file and VPs)
        Parameters:
        script - The script name
      • hasLog

        public static boolean hasLog(java.lang.String folderName)
        whether the folder is a log directory
      • getLogFile

        public static java.lang.String getLogFile(java.lang.String folderName)
      • getDatastoreFromLog

        public static java.lang.String getDatastoreFromLog(java.lang.String logstore)
      • getLinuxBrowserCommand

        public static java.lang.String getLinuxBrowserCommand()
        Utilty method to get a browser command that we can shell execute on Linux. Needed to bring up the HTML log. We determine what browser is available via the "which" shell command.
      • getBrowserCommand

        public static java.lang.String getBrowserCommand(java.lang.String htmlLog)
        Return the browser command to open the html Log
        Parameters:
        htmlLog -
        Returns:
      • getDojoJSLocation

        public static java.lang.String getDojoJSLocation()
        Return the dojo js location from the installation directory
        Returns:
        the dojo.js location if present, otherwise null
      • openLog

        public static boolean openLog(java.lang.String logFilePath)
        Returns true if the log is of dojo type and got opened successfully, false otherwise
        Parameters:
        logFilePath - The log file path
        Returns:
      • isLogBrowserBased

        public static boolean isLogBrowserBased(java.lang.String logFileName)
        Returns true if the log dosen;t require the eclipse IDE, to open the log. Typically for html, html and xml logs
        Parameters:
        logFileName -
        Returns:
        true if the log dosent; require the IDE to open the log, false otherwise
      • getBrowserCommandForNewUnifiedReport

        public static java.lang.String getBrowserCommandForNewUnifiedReport(java.lang.String log)
      • isInContainer

        public static boolean isInContainer()
        Returns true if the execution is on a container.
        Returns: