Вы находитесь на странице: 1из 40

®

RFT

IBM
Rational Functional Tester

Rational Functional Tester © 2006 IBM Corporation

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Introduction To Functional Tester :
®

Functional Test is an object-oriented automated testing tool that tests Java, HTML,
VB.NET, and Windows applications
Functional Test uses object-oriented technology to identify objects by their internal object
properties, not by screen coordinates
Functional Test features platform-independent and browser-independent test playback
Functional Test is integrated with Rational TestManager, which enables to record and
play back a Functional Test script from TestManager and make use of TestManager
features such as the Log.

What was Functional Tester previously known as


The First version of the Rational product in the Rational Suites Enterprise Studio was
Rational RobotJ.
The second release was the XDE Tester.
Functional Test is the newest version of these two products of Rational.
Functional Test includes all the functions of RobotJ & XDE Tester + New Features.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Setting Up Functional Test Script
®

 Installations & Configurations:

 For Testing Java Functional test supports the following java versions:
IBM JRE 1.2.2-1.4.2 + , SUN JRE 1.2.2-1.4.2 +
 Functional test supports testing of HTML in the following Browser versions:
• Internet Explorer 5.5, 6.0
• Netscape 4.7.x, 6.2.x, 7.01+, 7.1, 7.2
• Mozilla 0.9.2, 1.0.x, 1.4.x, 1.5, 1.6, 1.7
 For .NET & Windows applications Functional Test supports:
.NET Framework 1.0, 1.1platform for user applications

 Setting Up Log Options:


The Different Log Options available are:
• TestManager Log
• HTML Log
• Text Log
Also there is an option for not logging.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Developing Test Scripts:
®

 The Functional Test Window Perspective:


The Eight main Components of the Functional Test are:

 Functional Test Menu


 Functional Test Toolbar
 Functional Test Projects View
 Java Editor
 Script Explorer
 Console View
 Tasks View
 Status Bar

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Developing Test Scripts: ®

 Basic Workflow of Record, Playback and Verifying the Script:

 Recording:
Prior to recording configure test environments, the application and create a
project. Functional Test records any user actions against the application (Keystrokes & mouse
clicks).
Steps to record:
-- Click the Record a Functional Test Script button.
-- Perform any actions in the application
-- Click Stop recording when recording is finished.

 Playback:
During play back of a script, Functional Test replays the recorded actions, which automates the
software testing cycle.
The two general phases of script playback are:
-- Test Development phase -To verify that the application work as intended.
-- Regression Testing Phase - To compare the latest build of the application to the baseline
established during the test development phase

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Verification Points ®

 What is a Verification Point and what is its appropriate use ?


• Verification points (VP) verify that a certain action has taken place or verifies the state of an
Object.
• When VP is created, it captures the information of an object in the application to establish
baseline information for comparison during playback .

There are two types of verification points.


 Properties Verification Point --Verify specific properties for the selected Test Object to see if any
changes have occurred
 Data verification point – Verify data for the selected Test Object to see if any changes have
occurred

Further there are Five types of Data VP:


 Data Verification Point (Menu Hierarchy) - Tests the data in a menu hierarchy in your application.
 Data Verification Point (Table) – Tests Table data in the application
 Data Verification Point (Text ) – Tests data in the application
 Data Verification Point (Tree Hierarchy) – Tests data in a Tree Hierarchy in the application
 Data Verification Point (List) – Tests list in the application

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Functional Test Comparators ®

The Verification Point Comparator is


used to compare verification point data
after you play back a script with a
verification point and to update the
baseline file.
The Functional Test Verification Point
Comparator displays the verification
point data.
When a verification point fails, the
Comparator shows the expected and
the actual values, to help you analyze
the differences.
To view the comparator results:
On the verification point, in the
Functional Test HTML Log by clicking
the View Results link the comparator
can be opened and the results can be
seen.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Review & Edit Baseline Data ®

• If the verification point fails on a subsequent build of an application, the information can
be updated in the verification point so that the test continues to be valid for future builds.
• The Comparator includes the expected and actual data values and the differences are
• shown in red.
• To edit Baseline file to update the information for future builds, load the baseline file by
Clicking the Load Baseline to Edit toolbar button or Click File > Baseline.
The baseline file replaces the expected file.

• You can then load the baseline file and edit it or update it with the values from the actual
file.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Data Driven Tests ®

 To Data-Drive a test, need to select objects in the application- under test. The data-
driver populates a datapool with data from the application.

Datapool:
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.

 To Data-Drive a test script:


 On the Recording toolbar, click Insert Data Driven Commands ( ).
-- Populate the initial values in the application under test.
 Under Populate then Select Test Objects, drag the Object Finder tool ( ) to the
object in the application.
-- The Data- Drive Actions page displays information about the object that has been
selected.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Data Driven Tests ®

•Use selection wizard to select test objects ( )


-- This allows to include only the selected objects and the immediate children of
• the object.

Once the Data-Driving is complete, the Data-Driven Actions page closes and the Functional
Test populates a datapool with data collected from the application.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Script Debugging Process

 Exception Summary

CurrentBrowserException Thrown when an error occurs while setting the


current browser.

CurrentJVMException Thrown when an error occurs when setting the


current JVM.

RationalTestScriptException Thrown when a script ends due to an unhandled


Exception, RuntimeException, or Throwable (but
not an unhandled Error).

RunException Thrown when an error occurs in the run method of


RationalTestScript

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Script Debugging Process

Identifying different Script Failures:

com.rational.test.ft.script

Class RationalTestScriptException

java.lang.Object

java.lang.Throwable

java.lang.Exception

java.lang.RuntimeException

com.rational.test.ft.RationalTestException

com.rational.test.ft.NestedException

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Debugging Process

Use of Breakpoints :

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Evaluating and Executing Test steps ®

 Analyze Test results using test logs :

After

Executing the Script the results are viewed in the Logs.
Three types of Functional test logs can be used to view the playback results which are:

• Text -- Displays a log in ASCII format in the Functional Test script window.
• HTML -- Displays a log in HTML format in your default browser.
• TestManager -- Displays Functional Test log information in the Test Log window of
TestManager

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Evaluating and Executing Test steps ®

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Evaluating and Executing Test steps

• Analyze Test results using test logs :

After Executing the Script the results are viewed in the Logs.
Three types of Functional test logs can be used to view the playback results
which are:

• Text -- Displays a log in ASCII format in the Functional Test script window.
• HTML -- Displays a log in HTML format in your default browser.
• TestManager -- Displays Functional Test log information in the Test Log
window of TestManager

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Use of Wait states ®

 When to use the Wait state :


A Wait state for an Object is used during playback to check the existence on that
• object. This is useful for the actions that take long time.
To set a wait state for the object, either defaults can be used or can set your own time.
 Maximum Wait Time is the maximum number of seconds Functional Test will wait
for the object to appear in the application during playback .
 Check Interval is the number of seconds between times that Functional Test will
check for the object during the wait period.

 When Default is used the check for the existence of the object is for every 2 sec upto
120 secs.

 To set a Wait state, on the recording Monitor, select an Object and for the selected
object the time in seconds are given.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Use of Wait states ®

 Using Sleep states to delay the scripts


Sleep (seconds) command can also be inserted into the script where ever required to
delay the execution.

E.g.: sleep(0.1) – waits for 1/1oth of a sec.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Rational Functional Tester Agenda
®

 Introduction To Functional Tester

 Setting Up Functional Test

 Developing Test Scripts

 Verification Points

 Understanding Functional Tester Comparators

 Review and Edit Baseline data

 Data-Driven Test

 Script Debugging process

 Evaluating and Executing Test steps

 Use of Wait states

 Scripting

Rational Functional Tester © 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Functional Test Project


Stores Application’s Test Assets

Scripts
Object maps
Verification Point baseline files
Script Templates

 Java Project
• Use the project as the container of packages. In this organization, all Java packages
are created directly inside the project. This is the selected organization by default.
The generated CLASS files are stored along with the JAVA source files.
• Use source folders as the container for packages. In this project organization,
packages are not created directly inside the project but in source folders. You create
source folders as children of the project and create your packages inside these
source folders.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

Functional Test Perspective Window

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting
®

Java Perspective Window

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Call Script
While recording or editing a Functional Test script, a Call Script can be inserted.

 Use of Call Statement


This lets you avoid repeatedly recording similar actions on the application-under-test
by taking advantage of scripts that already exists.

E.g. Method:
callScript (“Scriptname “)

 Passing parameters to the call script:


The Caller script : Calls another script and passes parameters
The Called script : Receives the parameters and prints them.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 The Caller Script

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 The Called Script

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Datapool Creation

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Datapool Creation – Capturing the data values from the application.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Datapool creation – The Datapool code inserted into the script.

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Scripting ®

 Datapool Creation – Datapool values

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation
Thank You ®

Thank You

© 2006 IBM Corporation


Rational Functional Tester © 2006 IBM Corporation

Вам также может понравиться