Command line usage examples
A list of examples for some of the tasks that can be performed using the command line interface.
In these examples,
-classpath
must point to the
hcl_ft.jarfiles.Note: The <script-name> values use standard
Java™ package or .NET namespace naming conventions such as
package.MyScript
or Namespace.MyScript
.Task | Example |
---|---|
Record a new script: | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [ -map <sharedmap>] [options] -record <script-name> |
Record a simplified script | java -classpath <classpath> com.rational.test.ft.rational_ft -simplescript true -datastore <directory> [-map<sharedmapname>] [options] -record <script-name> |
Record into an existing script, inserting before or after a given line | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [ -insertbefore <line>] [ -insertafter <line>] [options] -map <sharedmap>] [options] -record <script-name> |
Compile a script Note: You must enable the Java
environment before compiling a script with this command. You must also install
Java SDK and add the bin directory to the path. |
java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [options] -compile <script-name> |
Play back a script by passing command-line arguments
<values> to the script Note: Ensure that you compile the script before
you playback the script from the command prompt for the first time. |
java -classpath <classpath>
com.rational.test.ft.rational_ft -datastore <directory>
-log <logname> [options] -playback
<script-name> [-args <values>] Note: To enable the
dynamic find feature for an individual script from the command line, pass
[-dynamicfind true] as arguments <values>. To disable, pass [-dynamicfind
false]. If you do not enable or disable the dynamic find feature here, the dynamic find setting on the Dynamic Find Enablement page in the Preferences dialog box, which applies globally to all scripts run in the integrated development environment (IDE), is used. |
Play back a script that uses classes from other functional test projects | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -projectpath <reference-project-path> -playback <script-name> |
Play back a script that uses other classes for the functional test projects | java -projectpath <projectpath> com.rational.test.ft.rational_ft -datastore <directory> -projectpath <reference-project-path> -playback <script-name> |
Play back a script that has an associated dataset | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -iterationCount <iteration value> -playback <script-name> |
Play back a script and export reports | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -playback <script-name>-exportlog <directory>/<filename without extension> |
Record, compile, and play back a script | java -classpath <classpath>
com.rational.test.ft.rational_ft -datastore <directory> [options]
-record <script-name> -compile -playback [
-args <values>] Note: To playback your scripts with
dynamic VPs, add -rt.interative true before
-playback in the command line. |
Construct an empty script | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -map <shared ma pname> [options] -create <script-name> |
Regenerate the helper file for a script | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -helper <script-name> |
Regenerate all helper files for a datastore | java -classpath <classpath> com.rational.test.ft.rational_ft -regenHelpers <script-name> |
Display an object-map file | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -display <object-map filename> |
Display a verification-point file | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -display <verification point filename> |
Edit an object-map file | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -edit <object-map filename> |
Edit a verification-point file | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -edit <verification point filename> |
Create and edit a shared-object map | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -fromMap <object-map filename1> -createMap <object-map filename2> |
Merge a later version of an object map into a current (modified) version of the same map | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -from <object-map filename1> -to <object-map filename2> -original <object-map filename1> -mergeMap |
Compare an actual verification point result to an expected verification point result | java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -baseline <baseline verification point filename> -compare <expected verification point filename> <actual verification point filename> |
Enable a configured browser, Java™ environment, or Eclipse platform | java -classpath <classpath> com.rational.test.ft.rational_ft -enableName <browser/Java environment/Eclipse> |
Disable all configured browsers, Java™ environments and Eclipse platforms | java -classpath <classpath> com.rational.test.ft.rational_ft -disableall |
Run the Application Configuration Tool | java -classpath <classpath> com.rational.test.ft.rational_ft -appConfig <application name> |
Run the Test Object Inspector | java -classpath <classpath> com.rational.test.ft.rational_ft -inspector |
Run the Object Properties Configuration Tool | java -classpath <classpath> com.rational.test.ft.rational_ft -objectlibraryou |