
Running Test Scripts
You can run Command Line test scripts containing tsscmd statements either from within the TestManager GUI, or from a command line via the rttsee command. You cannot run a Command Line test script containing tsscmd statements directly from the command line (by typing the test script's name.)
Running a Test Script from TestManager
This is the usual way to run test scripts containing tsscmd statements. You can:
- Run a single test script by itself. If you have added one or more test script types that use the Command Line execution adapter as we recommended (see Setting Up TestManager for tsscmd), you do this by selecting File > Run Test Script >
type
, where type
is the name you chose for the type (such as perl). Then you select the test script you want to run from a list. Alternatively (this is the only choice if you have not added a new test script type), you can select File > Run Test Script > Command Line and either type the path name of the script to run or use the browse button.
- Run a test script from within a test case (File > Run Test Case).
- Add the test script to a TestManager suite and run the suite (File > Run Suite). A suite can include different types of test scripts -- for example, you can add Command Line test scripts containing tsscmd statements to a suite that also contains Java, Visual Basic, GUI, VU, or custom test script types. For information about adding scripts to a TestManager suite, see the Using Rational TestManager manual.
Running a Test Script with rttsee
The rttsee program allows you to run a test script through its TSEA from the command line rather than from TestManager. For example, if you add a test script named datapoolTest
following the instructions in Sample Command Line Test Script, you can run the script from a Windows command window as explained below.
- Start a TSS server at a listening port (any port above 1024 will do). For example:
rttsee -k -P 3298
- Set environment variable
RTTSS_HOST
to localhost and RTTSS_PORT
to the port number you used in step 1. (On Windows systems, use the System Properties dialog.)
- Issue the run command. For example:
rttsee -e rttseacmd datapoolTest
The rttsee interface is useful for debugging, and for running test scripts on non-Windows platforms (for example, testing a UNIX Bourne shell script containing tsscmd statements). However, scripts that are run via this interface do not have access to the TestManager monitoring and reporting functions, so normally you use rttsee only for debugging or during development.
Test scripts are stored in a folder you specified when you added the Command Line test script type: see step 7 in section Setting Up TestManager for tsscmd. TestManager cannot execute test scripts that are stored in an unregistered location.
The syntax of rttsee
is:
rttsee [option [arg]]
The full options are described in the following table.
-d dir |
Specifies the directory for result files -- u-file (log), o-file, e-file. The default is the current directory. |
-e tsea [:type ] script [:type ] |
Specifies the TSEA to start and the test script to run. If tsea handles test scripts of more than on type, :type indicates the type of script . The :type may be specified with either or both the TSEA or script, but it must match if specified with both. |
-G [I | i T | t] |
Controls random number generation. Enter one choice (I or i , T or t ) from either or both pairs:
-
I Generate unique seeds for each virtual tester, using either the predefined seed or one specified with -S (default).
-
i Use the same seed for all virtual testers, either the predefined seed or one specified with -S .
-
t Seed the generator once for all tasks at the beginning, using either the predefined seed or one specified with -S (default).
-
T Reseed the generator at the beginning of each task.
|
-k |
Keep-alive. Use with -P to start a TSS server that keeps running after all test scripts have completed execution. |
-P portnumber |
Specifies the listening port for a TSS server that remains alive until explicitely stopped. |
-r |
Redirects stdio to the o-file and e-file (in the directory specified by -d ). |
-S seed |
Specifies an alternative seed value for the predefined seed. Must be a positive integer except in conjunction with -G i . |
-u uid |
Specifies the ID of a virtual tester. |
-V |
Displays the rttsee version. |
