Calling a script from a functional test script

While recording or editing a functional test script, you can insert a call to a previously recorded script. This lets you avoid repeatedly recording similar actions on the application-under-test by taking advantage of scripts that already exist.


Before you begin

To call a script from a functional test script:


Procedure

  1. If recording, click the Insert Script Support Commands button on the Recording Monitor toolbar.

    If editing:

    1. Position the pointer in the script where you want to place the callScript command.

    2. Click the Insert Recording into Active Functional Tester Script button on the Functional Tester toolbar.

    3. Click the Insert Script Support Commands button on the Recording Monitor toolbar.

  2. Click the Call Script tab in the Script Support Functions dialog box.

  3. In the Script Name field, select from the list the name of the script you want to call or enter the name.

  4. In the Datapool Iterator Count field, do one of the following:

    • Type or select the number of records in the datapool.

    • Select Iterate Until Done to access all records in the datapool.

    • Select Use Current Record to use the same record across the call script.

  5. Click Insert Code.

    Functional Tester inserts the callScript ("scriptname") code at the cursor location, where scriptname is the name you selected in the Script Name field.

  6. Click Close to remove the Script Support Functions dialog box from the screen.

    You can also insert one or more callScript commands from the Functional Tester Projects view .


What to do next


Related concepts

Get started with Rational Functional Tester

Work with keywords

Searching for test objects

Searching for SAP TestObjects

Simplified scripting

Related tasks

Insert a log message into a functional test script

Use timers with functional test scripts

Setting delays and sleep states for functional test script playback

Insert comments into a functional test script

Insert clipboard commands into a functional test script

Maintaining a test object map

Related reference

Call Script tab: Script Support Functions dialog box

Test object maps