Introduction to tsscmd |
A TestManager suite can contain test scripts of different types. When a TestManager user runs a suite, TestManager invokes a program (a test script execution adapter, or TSEA) that knows how to execute each type of script in the suite. One of the built-in test script types supported by TestManager is Command Line. Whenever a user executes a test script containing tsscmd statements, TestManager invokes the command line TSEA.
Although tsscmd can be called from a compiled program, the most likely usage is through tsscmd statements inside a source file written in a scripting language such as Perl. To use tsscmd in this way, we recommend that you add a test script type to TestManager that uses the command line TSEA.
The procedure for doing this is described below. Performing this procedure enables TestManager to execute Perl scripts containing tsscmd statements. You can then add Perl test scripts to suites containing test scripts of other types (Java, Visual Basic, VU, GUI). And you can run, view, or edit Perl test scripts from the TestManager File menu.
You can run single test scripts from TestManager that can be executed from the command line (whether or not they include tsscmd statements) without creating a new test script type. To do this, select File > Run Test Script > Command Line and either type the path name of the script to run or use the browse button.
To add a new test script type for Perl test scripts:
C:\testscripts\perl
. The folder can be on a local or a network location.
In the Name box, type the name of the new test script type -- for example, Perl Script
. Optionally, type a description and select an owner. Only the owner can edit or delete this script type.
Click Use the command line console adapter and fill in the boxes as follows:
Type {testscriptpath}
exactly as shown.
The program you enter (in this case notepad
) must be in your path.
Click Use the command line execution adapter. In the Execution command line box, type the execution command line for a new script instance. In this example, type the following exactly as shown:
The program (perl
) must be in your path. (A copy that is released with TestManager is located in the Rational Test folder, which will be in your path by default.)
In the Options area, type the following Option Name and Option Value pair:
Option Name: _TMS_TSO_EXEC_COPY_TO_AGENT_FILELIST
Option Value: {testscript}
In the Name box, type a descriptive name for this source. Optionally, type a description and an owner. Only the owner can edit or delete this source.
The Name you type here is added to the TestManager File > New Test Script, File > Open Test Script, and File > Run Test Script lists. Select this name to create a new Perl script or edit, view, or run an existing Perl script.
In the Data path box, type the directory name (corresponding to Name) that you designated in step 1. This is where source files for test scripts of this type are located.
If the data path might vary from one local computer to another, click Computer specific. In this case, the TestManager user is prompted for the actual path of a script at the time of selection.
The Connection options box allows you to specify platform-specific execution options for the script type's executable file (in this case, for perl
). No connection options are needed for this example. Click OK and close the dialog box to conclude the procedure.
The Command Line Interface to Rational Test Script Services | Rational Software Corporation |
Copyright (c) 2003, Rational Software Corporation | http://www.rational.com support@rational.com info@rational.com |