P. 1
Handout Software Testing v1.0

Handout Software Testing v1.0

|Views: 275|Likes:
Published by Prabhavith Reddy

More info:

Published by: Prabhavith Reddy on Sep 01, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Rational Robot to develop three kinds of scripts: GUI scripts for functional testing and VU and VB
scripts for performance testing. Robot can be used to:

Perform full functional testing. Record and play back scripts that navigate through your
application and test the state of objects through verification points.

Perform full performance testing. Use Robot and TestManager together to record and
play back scripts that help you determine whether a multi-client system is performing
within user-defined standards under varying loads.

Create and edit scripts using the SQABasic, VB, and VU scripting environments. The

Robot editor provides color-coded commands with keyword Help for powerful
integrated programming during script development.

Test applications developed with IDEs such as Visual Basic, Oracle Forms,

PowerBuilder, HTML, and Java. Test objects even if they are not visible in the
application's interface.

Collect diagnostic information about an application during script playback. Robot is
integrated with Rational Purify, Quantify, and PureCoverage. You can play back
scripts under a diagnostic tool and see the results in the log.

The Object-Oriented Recording technology in Robot lets you generate scripts quickly by simply
running and using the application-under-test. Robot uses Object-Oriented Recording to identify
objects by their internal object names, not by screen coordinates. If objects change locations or
their text changes, Robot still finds them on playback.

Handout – Software Testing

Page 131

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

The Object Testing technology in Robot lets you test any object in the application-under-test,
including the object's properties and data. You can test standard Windows objects and IDEspecific
objects, whether they are visible in the interface or hidden.

Once logged you will see the robot window. Go to File-> New->Script In the above screen
displayed enter the name of the script say “First Script” by which the script is referred to from now
on and any description (Not mandatory).The type of the script is GUI for functional testing and VU
for performance testing.

Handout – Software Testing

Page 132

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

The GUI Script top pane) window displays GUI scripts that you are currently recording, editing, or
debugging. It has two panes:

Asset pane (left) – Lists the names of all verification points and low-level scripts for
this script.

Script pane (right) – Displays the script.

The Output window bottom pane) has two tabs:

Build – Displays compilation results for all scripts compiled in the last operation. Line
numbers are enclosed in parentheses to indicate lines in the script with warnings and

Console – Displays messages that you send with the SQAConsoleWrite command.
Also displays certain system messages from Robot.

To display the Output window:

Click View ® Output.

How to record a play back script?

To record a script just go to Record->Insert at cursor

Then perform the navigation in the application to be tested and once recording is done stop the
recording. Record-> Stop

Handout – Software Testing

Page 133

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

In this window we can set general options like identification of lists, menus, recording think time in
General tab:

Web browser tab: Mention the browser type IE or Netscape…
Robot Window: During recording how the robot should be displayed and hotkeys

Object Recognition Order: the order in which the recording is to happen.
For ex: Select a preference in the Object order preference list.

If you will be testing C++ applications, change the object order preference to C++

Recognition Order.

Handout – Software Testing

Page 134

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

Go to Tools-> Playback options to set the options needed while running the script. This will help
you to handle unexpected window during playback, error recovery, mention the time out period, to
manage log and log data.

Verification points

A verification point is a point in a script that you create to confirm the state of an object across
builds of the application-under-test. During recording, the verification point captures object
information (based on the type of verification point) and stores it in a baseline data file. The
information in this file becomes the baseline of the expected state of the object during subsequent

When you play back the script against a new build, Robot retrieves the information in the baseline
file for each verification point and compares it to the state of the object in the new build. If the
captured object does not match the baseline, Robot creates an actual data file. The information in
this file shows the actual state of the object in the build.

After playback, the results of each verification point appear in the log in Test Manager. If a
verification point fails (the baseline and actual data do not match), you can select the verification
point in the log and click View ® Verification Point to open the appropriate Comparator. The
Comparator displays the baseline and actual files so that you can compare them. Verification point

Handout – Software Testing

Page 135

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

is stored in the project and is always associated with a script. When you create a verification point,
its name appears in the Asset (left) pane of the Script window. The verification point script
command, which always begins with Result =, appears in the Script (right) pane.

Because verification points are assets of a script, if you delete a script, Robot also deletes all of its
associated verification points. You can easily copy verification points to other scripts if you want to
reuse them.

List of Verification Points

The following table summarizes each Robot verification point.

Handout – Software Testing

Page 136

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

Handout – Software Testing

Page 137

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

About SQABasic Header Files

SQABasic header files let you declare custom procedures, constants, and variables that you want
to use with multiple scripts or SQABasic library source files.SQABasic files are stored in the
SQABas32 folder of the project, unless you specify another location. You can specify another
location by clicking Tools ® General Options. Click the Preferences tab. Under SQABasic path,
use the Browse button to find the location. Robot will check this location first. If the file is not there,
it will look in the SQABas32 directory.

You can use Robot to create and edit SQABasic header files. They can be accessed by all
modules within the project. SQABasic header files have the extension .sbh.

Adding Declarations to the Global Header File

For your convenience, Robot provides a blank header file called Global.sbh. Global.sbh is a
project-wide header file stored in SQABas32 in the project. You can add declarations to this global
header file and/or create your own.

To open Global.sbh:

Click File ® Open ® SQABasic File.

Set the file type to Header Files (*.sbh).

Select global.sbh, and then click Open.

Inserting a Comment into a GUI Script:

During recording or editing, you can insert lines of comment text into a GUI script. Comments are
helpful for documenting and editing scripts. Robot ignores comments at compile time. To insert a
comment into a script during recording or editing.

If recording, click the Display GUI Insert Toolbar button on the GUI Record toolbar. If
editing, position the pointer in the script and click the Display GUI Insert Toolbar button
on the Standard toolbar.

Click the Comment button on the GUI Insert toolbar.

Type the comment (60 characters maximum).

Click OK to continue recording or editing.

Robot inserts the comment into the script (in green by default) preceded by a single quotation
mark. For example:

This is a comment in the script

To change lines of text into comments or to uncomment text:

Highlight the text.

Click Edit ® Comment Line or Edit ® Uncomment Line.

About Data pools

A datapool is a test dataset. It supplies data values to the variables in a script during script
playback. Datapools let you automatically pump test data to virtual testers under high-volume
conditions that potentially involve hundreds of virtual testers performing thousands of transactions.

Handout – Software Testing

Page 138

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

Typically, you use a datapool so that:

Each virtual tester that runs the script can send realistic data (which can include
unique data) to the server.

A single virtual tester that performs the same transaction multiple times can send
realistic data to the server in each transaction.

Using Datapools with GUI Scripts

If you are providing one or more values to the client application during GUI recording, you might
want a datapool to supply those values during playback. For example, you might be filling out a
data entry form and providing values such as order number, part name, and so forth. If you plan to
repeat the transaction multiple times during playback, you might want to provide a different set of
values each time. A GUI script can access a datapool when it is played back in Robot. Also, when
a GUI script is played back in a TestManager suite, the GUI script can access the same datapool
as other scripts.

There are differences in the way GUI scripts and sessions are set up for datapool access:

You must add datapool commands to GUI scripts manually while editing the script in
Robot. Robot adds datapool commands to VU scripts automatically.

There is no DATAPOOL_CONFIG statement in a GUI script. The SQADatapoolOpen
command defines the access method to use for the datapool.

Although there are differences in setting up datapool access in GUI scripts and sessions, you

define a datapool for either type of script using TestManager in exactly the same way.

Debug menu

The Debug menu has the following commands:


Go Until Cursor




Set or Clear Breakpoints

Clear All Breakpoints

Step Over

Step Into

Step Out

Note: The Debug menu commands are for use with GUI scripts only.

Compiling the script

When you play back a GUI script or VU script, or when you debug a GUI script, Robot compiles
the script if it has been modified since it last ran. You can also compile scripts and SQABasic
library source files manually.

Handout – Software Testing

Page 139

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

During compilation, the Build tab in the Output window displays compilation results and error
messages with line numbers for all compiled scripts and library source files. The compilation
results can be viewed in the Build tab of the Output window.

Handout – Software Testing

Page 140

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

Compilation errors

After the script is created and compiled and errors fixed it can be executed. The results need to be
analyzed in the Test Manager.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->