Rational Functional Tester (RFT)
Agenda
Introduction
Datastore
Enabling Environments
Configuring Application for Testing
Recording Automation Script
Play Back
Resources
Data Driven – Data Pool
Introducing RFT…
What it is…
RFT is a GUI Testing application that is built
on Eclipse and uses Java as its testing
language. It tests by replicating user input
following a script written by the user.
Those that are familiar with WinRunner or
RobotJ or XDE Tester will be Comfortable
with this type of testing.
Salient Features of RFT
RFT is Cross Platform capable
Scripts are in Java.
Object Oriented.
Recording - Creates scripts by its own against user’s
actions on a Java or HTML application.
Uses Eclipse editor as IDE.
Platform Support
Microsoft Windows
Microsoft Windows XP Professional with Service Pack 1 or 2
Microsoft Windows 2000 Professional with Service Pack 4
Microsoft Windows 2000 Server with Service Pack 4
Microsoft Windows 2000 Advanced Server with Service Pack 4
Microsoft Windows Server 2003 Standard Edition with Service
Pack 1
Microsoft Windows Server 2003 Enterprise Edition with Service
Pack 1
Linux
Red Hat Enterprise Linux Workstation Version 4.0
Red Hat Desktop Version 4.0 (running in 32-bit mode)
SUSE Linux Enterprise Server (SLES) Version 9 (all service packs;
running in 32-bit mode)
IDE Setup
Perspectives:
Perspectives control what appears in certain
menus and toolbars. (e.g.: Java ,Test,
Debug etc…)
Path :Main menu->Windows->Open
Perspective
RFT Default Window Menu
Menu Bar
Bar
Script
Script View
View
Script
Script View
View
Script
Script
Functional
Functional Explorer
Explorer
Test
Test Scripts
Scripts
Task
Task List,
List, Console,
Console, ...
...
What are the major views (or
windows )
Functional Test Project explorer
Script editor
Script explorer
Task window
Console window
Debug view
Play back window
The “workbench”
Functional Test Project
Funtional Test Project -- Description
Basically a folder with files that holds:
Scripts
RFT resources associated with the scripts
Script templates
Logs text and HTML
Object maps
Verification point files
Functional Test Project properties
windows
The Functional Test Project properties
window is of great importance
Setting the build path
Including libraries and jar files required
FT properties window
Create or Connect to a Functional Test
Project
File > New > Functional Test Project
File > Connect to a Functional Test Project…
Create a RFT Functional Test Project
Enabling Environments
Enabling Environments for Testing
What are environments?
Environments specify where your application will run
Each browser is considered an “environment” for running
HTML applications
Browsers have plug-in environments (designated Java
runtime – JRE) for running Java applets
JREs/JVMs/JDKs are environments for running Java
applications
What is enabling?
Enabling provides information to RFT about the
environment so it can set up how to communicate with
the application during recording
Enabling Environments for Testing
Target environments must be enabled prior to recording
Enabling Environments – Web
Browsers
Search
Add …
Remove
Enable
Disable
Set as
Default
Enabling Environments – Java
Environments
RFT Tester JRE is
automatically
enabled and set as the
default JRE
Search to add other
JRE’s (note: search
takes a long time)
When setting up
environments, specify
the JRE the target
application for testing is
supposed to use
Enable
Set as Default
Configuring Applications
Configuring Applications for
Testing
What is configuring an application in RFT?
Configuring an application specifies runtime options
so that the application can be launched from RFT
Why is configuring necessary?
The application under test must be configured in
order to launch the application during a RFT record
session
Configure Applications for Testing
Set up RFT Tester to run the target application
Application Configuration Tool
Add
Remove
Run
Add Application
Add Application – Java, HTML or
Executable
JAVA
HTML
Local = HTMLURL
= e.g.
[Link]
Executable
or Batch File
Test Configuration
Run application from Application Configuration Tool to
test the configuration
Recording & Playback
Recording Automation Script
Test application should be learnt for automation.
Application can be learnt through recording.
For Recording
[Link] the record button OR
Click File->New->Functional Test script using recorder.
[Link] script recorder window.
[Link] the application to be recorded.
[Link] the application.
[Link] records the application and generates an
automation script.
Recording Automation Script…
Recording Automation Script…
File->New->XDE-Tester script using recorder.
Clicking this will launch Script recorder window
Recording Automation Script…
Clicking the Start Application button launches
the application window.
Start Application
Recording Automation Script…
Select an application from the application window.
Start recording the application by clicking OK button.
Recording Automation Script…
RFT learns the actions performed over the application.
Script Recorder Window shows recording details .
Click stop button to end recording.
Automation script is created
Stop Recording
Run
Playback
Select the script and click the running man button.
Script name
Playback…
Brings RFT Play
back monitor
Script name
Execution line
number
Current line Script name
Current line in
the script Current line
Associated Resources
Associated resources
Test object maps
Verification points
Scripts
Logs( After Playback)
VP
Script
logs
Test Object
map
Test object Maps
The Functional Tester test object map lists
the test objects in the application under
test.
Test Object Maps store information about
the objects of the application being tested
It is a static view that describes test
objects known to Functional Tester in the
application-under-test.
Test object Maps…(Create)
While creating
script
Click next
brings up this
window
Default is
private
Click Finish
Test object Maps…(Create)
On choosing shared
Displays any existing
shared TOM
Selecting from
display makes that as
the TOM for this
script
Adding Test Objects…
Launch the application to be automated.
Open the TOM window by double clicking
TOM icon in the tester script explorer.
Learn the object of interest using the
Object finder.
Adding Test Objects…
TOM
TOM window
Adding Test Objects…
Select an object to
learn
RFT highlights the selected Test Object by a red box
Adding Test Objects…
Adding Test Objects…
Adding Test Objects…
Verification Points
Verification points verify the state of an object.
When you create a verification point, you are
capturing information about an object in the
application
To establish this as baseline information for
comparison during playback.
Create a VP
•Using RFT Tester Recorder action wizard
Create a VP
Create a VP
Logs
Text
Html
Data Pool :
A datapool is a test dataset, a
collection of related data records
which supplies data values to the
variables in a test script during test
script playback.
Datapool Usage
To add realistic data to a test script
To import data from a Functional Tester datapool,
an IBM Rational TestManager datapool, or a .csv file
created using a spreadsheet application.
To create a datapool manually and add data to a
datapool
To edit datapool values or change data types
To export datapools to use in other Functional Test
projects or to a .csv file to edit in a spreadsheet
application.
To change the datapool record selection order to
determine how the test script accesses an
associated datapool during playback.
Functional Tester Command-Line
Interface
java <standard java options>
[Link].rational_ft <Functional
Tester options>
Example :
java -classpath "E:\Program
Files\IBM\SDP70\FunctionalTester\bin\ratio
nal_ft.jar;" [Link].rational_ft
–datastore C:\RftTestScripts\Project1
-playback Script1
Some CLI Options
-datastore <datastore directory> is
needed whenever a script is specified, for
example with -record or -playback.
-record <script name> to record a new
script (or in conjunction with -insertafter
<line number> to insert recording into an
existing script).
-playback <script name> to play back a
specific Java script.
Hands - On
Sample Functional Test Script
Recording Functional Test Script
Functional Test Script using Data
Pool
Help Resources
RFT Online Help
Subscribe to rft-trolls@[Link]
and aidan-trolls@[Link] for RFT
related mails.