Tutorial-13 How to call a script from a IBM RFT-Functional Test Script
A suggestion of great value:
Before practicing these Tutorials on “Rational Functional Tester – IBM RFT”, it is recommended that you acquire a preliminary working knowledge of using this wonderful tool –“Rational Functional Tester”. This can be easily attained by careful study of the“Frequently Asked Questions � FAQ�s” brought to you by this web site for the first time by Clicking on the following link:
Learn the Basics of RFT through FAQ’s
<<<<<<<<=========== >>>>>>>>
This article presents a simple method of calling a script from IBM – RFT Functional Test Script
While recording or editing a RFT script, we can insert a call to a previously recorded script. This allows us to avoid repeatedly recording similar actions on the application-under-test by taking advantage of scripts that already exist.
Steps to call a script from a RFT script are as under:
Step – 1: In case of recording:
click the “Insert Script Support Commands” button on the Recording Monitor toolbar.
Step – 2: In case of editing:
2a) Position the pointer in the script where we want to place the callScript command.
2b) Click the “Insert Recording into Active Functional Tester Script” button on the RFT toolbar.
2c) Click the “Insert Script Support Commands” button on the Recording Monitor toolbar.
Step – 3: Click the “Call Script tab” in the Script Support Functions dialog box.
Step – 4: In the “Script Name” field, select from the list the name of the script we want to call or enter the name.
Step – 5: In the “Datapool Iterator Count” field, do either of the following according to the need
# 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.
Step – 6: Click “Insert Code”.
RFT inserts the callScript (“scriptname”) code at the cursor location, where scriptname is the name we had selected in the “Script Name” field.
Step – 7: Click “Close” to remove the Script Support Functions dialog box from the screen.
Important: we can also insert one or more callScript commands by:
a) For RFT – Java Scripting – from the “Functional Tester Projects view”.
b) For RFT – VB.NET Scripting – from the “Solution Explorer”.
Many More Tutorials on IBM RFT
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.