HCL OneTest UI, VB.NET scripting command-line interface

Some actions that can be performed from the HCL OneTest UI graphical user interface can also be performed from the VB.NET Scripting Edition specific command line.

These actions include:

  • Compile a script
  • Compile/re-compile an entire project
  • Play back a script
  • Add/remove Full Trust for a project to the .NET runtime security policy
  • Write a .NET configuration for an executable or assembly to use an acceptable framework

Command line format

The core command line format, to display the error messages in the command line window is:

rational_ft.exe <HCL OneTest UI VB.NET options> for VS .Net 2005
rational_ft11.exe <HCL OneTest UI VB.NET options> for VS .Net 2003

The core command line format is:

rational_ftw.exe <HCL OneTest UI VB.NET options> for VS .Net 2005
rational_ftw11.exe <HCL OneTest UI VB.NET options> for VS .Net 2003
Note: The rational_ftw.exe file is similar to the rational_ft.exe file and the rational_ftw11.exe file is similar to the rational_ft11.exe file. However, the rational_ftw.exe and rational_ftw11.exe files do not display the error messages in the console window.

Recording of scripts, environment enablement, and editing of assets are only available from the HCL OneTest UI Java command-line interface. For more information, see Command line interface.

To record a VB.NET script using the HCL OneTest UI Java command-line interface, you can use the options described for recording plus the language VB option. The language VB option specifies that the Java command-line recorder should generate the test scripts in the VB.NET language.

Common HCL OneTest UI VB.NET scripting command-line options

Some of the more common HCL OneTest UI VB.NET scripting command-line options include:

-datastore <project directory>
Use to identify the project location.
-compile <script name>
Use to compile a specific script.
-compileall [<namespace>]
Use to incrementally compile the whole project namespace specified, or the entire project if no namespace is provided.
-recompileall [<namespace>]
Use to do a full compilation of the whole project namespace specified, or the entire project if no namespace is provided.
-playback <script name>
Use to play back a specific script.
-addfulltrust
Use to add Full Trust runtime security policy for the specified project (use datastore). With the .NET Framework, the default security policy prohibits playback of scripts from a project over the network.
-removefulltrust
to remove the Full Trust runtime security policy for the specified project (use datastore).
-writeconfig <path to application>
to have an application built with an older version of the .NET framework to use .NET Framwork 1.0 or above.

Examples of command-line usage

Some examples of command-line usage are:

For more information, see Command line interface.

Record a new VB.NET script:

Record a new script:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> [ -language vb -map <sharedmap>] [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] -language vb -map <sharedmap>] [options] -record <script-name>

Compile a script:

Note: You must enable the Java environment before doing this. You must also install Java SDK and add the bin directory to the path.
rational_ft11.exe -datastore <directory> [options] -language vb -compile <script-name>

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

rational_ft11.exe -datastore <directory> -language vb -log <logname> [options] -playback <script-name> [ -args <values>]

Play back a script, with an associated dataset:

rational_ft11.exe -datastore <directory> -language vb -iterationCount <count> -playback <script-name>
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> -language vb -map <sharedmapname> [options] -create <script-name>

Regenerate the helper file for a script:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -helper <script-name>

Regenerate all helper files for a datastore:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -regenHelpers <script-name>

Display a object-map file:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -display <object-map filename>

Display a verification-point file:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -display <verification point filename>

Edit a object-map file:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -edit <object-map filename>

Edit a verification-point file:

java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -language vb -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 -language vb -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 -language vb -appConfig <application name>

Run the Test Object Inspector:

java -classpath <classpath> com.rational.test.ft.rational_ft -language vb -inspector

Run the Object Properties Configuration Tool:

java -classpath <classpath> com.rational.test.ft.rational_ft -language vb -objectlibrary

Running HCL OneTest UI in unattended batch mode

If you have TestManager installed and you want to run HCL OneTest UI 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_name 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 HCL OneTest UI 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:

rational_ft.exe -datastore \\My_project\AUser\RobotJProjects -user admin -project_name \\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