Introduction to tsscmd

prevnext

Setting Up TestManager for 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:

  1. Create (or designate) a folder for Perl test scripts -- for example, C:\testscripts\perl. The folder can be on a local or a network location.

  2. From TestManager, click Tools > Manage > Test Script Types. The Manage Test Script Types dialog box appears.

  3. Click the New button. The New Test Script Type dialog box appears with the General tab selected.

    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.

  4. Click the Console Adapter Type tab. The dialog box changes as shown below.

    Click Use the command line console adapter and fill in the boxes as follows:

  5. Click the Execution Adapter Type tab. The dialog box changes as shown below.

    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:

    perl {testscriptpath}

    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.)

  6. Click Test Script Options. The Test Script Options dialog box opens as shown below.

    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}

    Click OK.

  7. Click the Sources tab. The dialog box changes as shown below.

  8. Click Insert. A popup appears telling you that the test script you are defining must be created before proceeding -- answer Yes. The dialog box changes as shown below.

    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.

  9. Click the Connection Data tab. The dialog box changes as shown below.

    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.

prevnext


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