Designing IA for AI - Information Architecture Conference 2024
RFT Tutorial - 6 How Can We Create A New RFT Script Manually I.E. Without Recording
1. RFT Tutorial - 6: How can we create a new RFT script Manually i.e. without Recording?
There is an alternative to recording, wherein we can manually create a script to enter the Java code for use
in RFT.
When we create a new script, the RFT includes import statements for all the files required to compile the
script and comments. These files contain important archiving information. By default, RFT uses the script
name as the class name and sets up testMain, where we can add various commands to include in the script.
This short tutorial describes various steps to create a new RFT script manually as a substitute for
recording:
Step –1: Click the “Create an Empty Functional Tester Script” button on the RFT toolbar
Alternatively
Click “File” > “New” > “Empty Functional Tester Script” on the RFT menu.
Step –2: In the “Create an empty Functional Tester script dialog box”, enter or select a folder for the
script and type a name in the “Script name” field.
The script name must follow the naming conventions defined for Java class names.
Step –3: Apply the check mark against “Add the script to Source Control” in case we want to keep the
script under source control.
Step –4: Here we have two options to create a local test object map for the script:
Option –1: Click “Next” for using a different “Test Object Map”, “Helper Superclass”, or “Test Datapool”.
Chose the desired test assets out the following choices offered in the “Select Script Assets page”, and
click “Finish”:
# Select and set a default test object map.
# Select and set a default helper Superclass.
# Select a test Datapool.
# Select a Datapool record selection order.
Option –2: Click “Finish” for creating a new script.
This step creates a local test object map for our script and displays the script in the Projects View.
Step –5: To put the script under source control:
1) Do Right-click over the new script in the Projects View
2) Click “Team”
3) Click “Check In”.
4) Click “Finish” in the “Check In” dialog box.
Step –6: Start adding the desired code to the script.
For adding the desired objects and methods to the script we can use the Test Object Map.
2. We can add special features like call script command, log entry, timer, script delay, or comment to the script.
This can be done by clicking the “Insert Recording into Active Functional Tester Script” button available
on the toolbar of RFT. Then on the Recording toolbar, click the “Insert Script Support Commands
button”.
We can also use the buttons on the Recording toolbar for starting an application from the script or for
creating a verification point.
Tutorial by :
http://www.softwaretestinggenius.com