com.rational.test.ft

Class rational_ft

  • java.lang.Object
    • com.rational.test.ft.rational_ft


  • public class rational_ft
    extends java.lang.Object
    Command-line interface for Functional Test. From the command line you can perform the following tasks:
    • Record a script
    • Compile a script
    • Play back a script, passing command-line arguments to the script
    • View and edit verification-point and object-map files
    • Invoke the Java/HTML enabler
    • Invoke the Application Configuration Tool
    • Run Functional Test unattended in batch mode
    • Write an application config for a .NET application

    Command Line Usage:

    The beginning of the Functional Test Command-line interface can come in one of two primary forms. In the text below we refer to either of these beginnings as hcl_ft.jar.
    • java -classpath <hcl_ft> com.rational.test.ft.rational_ft
    • java -jar hcl_ft.jar
    Note that you should use the first version of the command line if you use PurifyPlus.
    • Record a new script:
      java -jar hcl_ft.jar -datastore <directory> [-map <sharedmap>] [options] -record <script-name>
    • Record into an existing script, inserting before or after a given line:
      java -jar hcl_ft.jar -datastore <directory> [-insertbefore <line>] [-insertafter <line>] [-map <sharedmap>] [options] -record <script-name>
    • Compile a script:
      java -jar hcl_ft.jar -datastore <directory> [options] -compile <script-name>
    • Play back a script, passing command-line arguments <values> to the script:
      java -jar hcl_ft.jar -datastore <directory> -log <logname> [options] -playback <script-name> [-args <values>]
    • Play back a script, with an associated datapool:
      java -jar hcl_ft.jar -datastore <directory> -iterationCount <count|ALL> [options] -playback <script-name>
    • Play back a script that uses classes from other Functional Test projects
      java -jar hcl_ft.jar -datastore <directory> -projectpath <reference-project-path> -playback <script-name>
    • Record, compile, and play back a script:
      java -jar hcl_ft.jar -datastore <directory> [options] -record <scriptname> -compile -playback [-args <values>]
    • Construct an empty script:
      java -jar hcl_ft.jar -datastore <directory> -map <sharedmapname> [options] -create <scriptname>
    • Regenerate the helper file for a script:
      java -jar hcl_ft.jar -datastore <directory> [options] -helper <scriptname>
    • Regenerate all helper files for a datastore:
      java -jar hcl_ft.jar -datastore <directory> [options] -regenHelpers
    • Display a verification-point file or object-map file:
      java -jar hcl_ft.jar -datastore <directory> [options] -display <file>
    • Edit a verification-point file or object-map file:
      java -jar hcl_ft.jar -datastore <directory> [options] -edit <file>
    • Create and edit a shared-object map:
      java -jar hcl_ft.jar -datastore <directory> -fromMap <existingmap> [options] -createMap <mapfile>
    • Merge a later version of an object map into a current (modified) version of the same map. (Used for CMVC version updating):
      java -jar hcl_ft.jar -datastore <directory> [options] -from <sourcemapname> -to <targetmapname> [-original <commonmapname>] -mergeMap
    • Compare an actual verification point result to an expected verification point result:
      java -jar hcl_ft.jar -datastore <directory> [options] -baseline <vpname> -compare <expectedfile> <actualfile>
    • Run the Java/HTML/Eclipse enabler:
      java -jar hcl_ft.jar -enable [enabler-arg]
      where enabler-arg can be:
      • ALL searches all drives and enable all found browsers, Java environments, and Eclipse platforms
      • <dir> enables the browser, Java environment, or Eclipse platform in the given directory
      • (empty) runs the enabler interactively
    • Enable a configured browser, Java environment, or Eclipse platform:
      java -jar hcl_ft.jar -enableName [configured-name]
      where configured-name is the logical name of the browser or Java environment configured by the Enabler that will be enabled
    • Disable all configured browsers, Java environments, and Eclipse platforms:
      java -jar hcl_ft.jar -disableall
    • Run the Application Configuration Tool:
      java -jar hcl_ft.jar -appConfig [config-arg]
      where config-arg can be the logical name of an app to center on
    • Run the Test Object Inspector:
      java -jar hcl_ft.jar -inspector
    • Write a config for a .NET application:
      java -jar hcl_ft.jar -writeconfig [executable-including-path]
      where executable-including-path is the fully qualified path to the executable

    For commands that take a <script-name>, the name can be a simple identifier, or it can use Java package syntax. For example:

    • To record a script test1.java using . as the datastore directory:
      java -jar hcl_ft.jar -datastore . -record test1
    • To record a script test2.java that lives in a package subdirectory:
      java -jar hcl_ft.jar -datastore . -record subdir.test2

    For the commands where options can be specified, available options are:

    • -<option-name> <value> set the option to the value
    • -reset <option-name> reset the option to its default value
    • -resetall reset all options to their respective default values
    • -args <values> command-line arguments to be passed to the playback script
    • -datapool <datastore-relative-name> sets the shared datapool name
    • -helpersuper <helper-class-name> the helper superclass name to be used when generating the helper file
    • -iterationCount <integer|ALL> the number of times the script will be iterate over the associated datapool.

    For example, -rt.log_format none specifies that no log gets displayed. Supported options and their values are listed in IOptionName.

    Since:
    RFT1.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      protected static class  rational_ft.Debug 
    • Constructor Summary

      Constructors 
      Constructor and Description
      rational_ft() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      protected static void debug(java.lang.String message) 
      protected static void debug(java.lang.String message, int severity) 
      static void main(java.lang.String[] args)
      Entry point for the Java application.
      protected static void main(java.lang.String[] args, java.lang.String eclipseApplicationName)
      This method allows for multiple entry points to Functional Tester with different command processing needs but similar class loading setup.
      • Methods inherited from class java.lang.Object

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

      • rational_ft

        public rational_ft()
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
        Entry point for the Java application. The command line now runs as an eclipse application. So we need to: 1) Find the eclipse directory and the startup jar inside it. 2) Put the startup.jar into a classloader and load the startup passing it a
        Since:
        RFT1.0
      • main

        protected static void main(java.lang.String[] args,
                                   java.lang.String eclipseApplicationName)
        This method allows for multiple entry points to Functional Tester with different command processing needs but similar class loading setup. For instance the Functional Test Command-line interface main can use this methods as well as the Hyades test suite run support. The general idea is that the classpath for Functional Tester is generally incomplete and this code resolves those issues and allows users to focus on the classes that scripts use and not the JARs/DLLs needed by Functional Tester.
      • debug

        protected static void debug(java.lang.String message)
      • debug

        protected static void debug(java.lang.String message,
                                    int severity)