VB.NET scripting command-line interface

Some of the actions that can be performed from the HCL OneTest UI graphical user interface can also be performed from the VB.NET Scripting Edition 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>

The core command line format is:

rational_ftw.exe <HCL OneTest UI VB.NET options>
Note: The rational_ftw.exe file is similar to the rational_ft.exe file. However, the rational_ftw.exe file does 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 with the language VB option. The language VB option specifies that the Java command-line recorder must 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 are as follows:
Command-line option Usage
-datastore <project directory> Used to identify the project location.
-compile <script name> Used to compile a specific script.
-compileall [<namespace>] Used to incrementally compile the whole project namespace specified, or the entire project if no namespace is provided.
-recompileall [<namespace>] Used to do a full compilation of the whole project namespace specified, or the entire project if no namespace is provided.
-playback <script name> Used to play back a specific script.
-addfulltrust Used 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 Used to remove the Full Trust runtime security policy for the specified project (use datastore).
-writeconfig <path to application> Used to have an application built with an older version of the .NET framework (.NET Framework 1.0 or above).

Examples of command-line usage

Some examples of command-line usage are:

For more information, see Command line interface.

Task Command syntax
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_ft.exe -datastore <directory> [options] -language vb -compile <script-name>
Play back a script, passing command-line arguments <values> to the script rational_ft.exe -datastore <directory> -language vb -log <logname> [options] -playback <script-name> [ -args <values>]
Play back a script, with an associated dataset rational_ft.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