Functional Tester Command-Line Interface

Most actions that can be performed from the Functional Tester graphical user interface can also be performed from the command line, including:

The core command line format is:

java <standard java options> com.rational.test.ft.rational_ft <Functional Tester options>

The standard java options refer to the Java command line options such as -classpath <classpath> to set the classpath appropriately or -D to define a system property. Either the JRE associated with this command needs to be enabled by Functional Tester, or the following options must be set:

If the JRE is enabled by Functional Tester, these options are not necessary.

See the Functional Tester API Reference (com/rational/test/ft/rational_ft) for a full list of the command-line options.

The more commonly used options include:

Here are some examples of command-line usage:

In these examples, -classpath must point to the rational_ft.jar files.

Note: The <script-name> values use standard Java package or .NET namespace naming conventions such as package.MyScript or Namespace.MyScript.

Record a new script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [-map <sharedmap>] [options] -record <script-name>

Record into an existing script, inserting before or after a given line:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [-insertbefore <line>] [-insertafter <line>] [options] -record <script-name>

Compile a script:

Note: The java compiler is no longer installed with Functional Tester. You must install JRE and add the bin directory to the path.

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [options] -compile <script-name>

Play back a script, passing command-line arguments <values> to the script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -log <logname> [options] -playback <script-name> [-args <values>]

Record, compile, and play back a script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [options] -record <script-name> -compile -playback [-args <values>]

Construct an empty script:

java -Drational_ft.install.dir=<Rational FT install directory> -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -map <sharedmapname> [options] -create <script-name>

Running Functional Tester in unattended batch mode

If you have TestManager installed and you want to run Functional Tester unattended in batch mode with a TestManager log, you must include the following options on the rational_ft command line:

-user username

The TestManager user name for login.

-password password

Optional. The TestManager password for login. Do not use this if there is no password.

-project fullpath and full projectname

The name of the TestManager project, which is preceded by its full path. This is case-sensitive.

-build build

The name of an existing TestManager build. See Note below.

-logfolder foldername

The name of an existing TestManager log folder (see Note below) or the file specification for an HTML or a text log. If you use the HTML or text log folder name, you do not need to specify the build.

Note: If you want to create a TestManager log, make sure you create the TestManager build and the TestManager log folders first. See the note about TestManager integration at the end of this topic. If these two folders do not exist, execution will fail when you run Functional Tester unattended in batch mode.

-log logname

The name of the TestManager, HTML or text log. If you use the HTML or text log name, you do not need to specify the build.

Example:

java -Drational_ft.install.dir="C:\Program Files\IBM\Rational\Software Development Platform\6.0\FunctionalTester\eclipse\plugins\com.rational.test.ft.wswplugin_6.1.0" -classpath "C:\Program Files\IBM\Rational\Software Development Platform\6.0\FunctionalTester\eclipse\plugins\com.rational.test.ft.wswplugin_6.1.0\rational_ft.jar" com.rational.test.ft.rational_ft -datastore \\My_project\AUser\RobotJProjects -user admin -project \\My_project\AUser\TestManagerProjects\Test.rsp -build "Build 1" -logfolder "Default" -log "Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback basetests.SimpleClassicsA_01

If you do not want TestManager to display the log after playing the script, you must also include the following option on the rational_ft command line:

-rt.bring_up_logviewer false

Note About TestManager Integration

Functional Tester is integrated with Rational TestManager version 2003.06.13. If you have the 2003.06.13 version of TestManager, you will be able to use the integrated features of Functional Tester and TestManager. Please see Understanding Functional Test Product Packaging and Integrations for important information on using the products together.

Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.