Académique Documents
Professionnel Documents
Culture Documents
Tests that need to be run for every build of the application (sanity check, regression test)
Tests that use multiple data values for the same actions (data driven tests)
Stress/load testing
Manual Testing:
Time consuming
Low reliability
Human resources
Inconsistent
Automated Testing:
Speed
Repeatability
Programming capabilities
Coverage
Reliability
Reusability
Set up test framework and add / register a project using Rational Administrator.
Configure the Project
Create Test Data Store as test assets.
Set up user groups and users for the project.
You can regulate access to the Rational Test datastore by using users and groups. You
can set the Rational Test datastore privileges for a test user to create, modify and delete:
--Test planning assets
--Test implementation assets
--Test execution assets
--Test results analysis assets
Create TestScripts:
GUI recording options provide instructions to Robot about how to record and generate
GUI scripts.
Recommended to set these options before you begin recording.
On the screen that pops up, enter a name of the script (TestScript) and click OK.
By default, Robot minimizes its main window so you can work with the application-
under-test.
When in Record Mode, the toolbar will be on top and will record all key strokes and
mouse clicks. If you want to do something that you don’t want to record, remember to
pause first.
Click the Display GUI Insert Toolbar button on the GUI Record toolbar.
Start the application or other executable program to be tested by using one of the Start
buttons on the GUI Insert toolbar.
Start Application .
Start Java Application .
Start Browser.
To insert verification points, on the GUI Record Toolbar, click the “Display GUI Insert”
again. There are many buttons to set VPs.
Click the Object Data VP button on the toolbar. Enter the name of verification point.
Click OK.
Drag and drop the “Object Finder Tool” over the object.
The window that appears shows you what data can be verified with this VP. Select
“contents” and Click OK.
You will now have the scripts ready with verification point in it.
Recording Modes:
Rational Robot has two recording modes
Object-Oriented Recording mode – It is the default method. Robot uses internal object
names to identify objects, instead of using mouse movements or absolute screen
coordinates.
Low-level recording mode – Records detailed mouse movements and keyboard actions
by screen coordinates and exact timing. Use low-level recording when you are testing
functionality that requires the tracking of detailed mouse actions ,such as in painting,
drawing, or CAD applications.
To switch between the two modes during recording, do one of the following:
--Press CTRL+SHIFT+R.
--Click the Open Robot Window button on the GUI Record toolbar (or press
CTRL+SHIFT+F) to bring Robot to the foreground. Click Record > Turn Low-Level
Recording On/Off.
Robot Inspector:
The inspector in Robot helps in identifying the objects and their properties present in the
screens of the AUT.
Clicking Tools -> Inspector, opens the Inspector window and all the properties of all the
windows open on the desktop are captured by it.
By pointing and clicking the icon of the Inspector on the desired object, all the child
properties of the object are captured with all the properties of the object, even hidden
ones.
It is not integrated with the Robot such that the properties which are captured, appear in
the Robot script automatically.
Verification Points:
Object Properties
Object data
Alphanumeric
Menu
Clipboard
Region Image
Window Existence
Window Image
File Comparison
File Existence
Click the Display GUI Insert Toolbar button on the GUI Record toolbar.
Retry every
Timeout after
Can be used for Windows objects that Robot recognizes. These include: Checkbox,
Generic, Group Box, Label, Pushbutton, Radio Button, Toolbar, Window (caption).
Captures and compares the menu title, menu items, shortcut keys, and the state of
selected menus.
Robot records information about the top menu and up to five levels of sub-menus.
Captures and compares alphanumeric data that has been copied to the Clipboard.
To use this verification point, the application must supply a Copy or Cut capability so
that you can place the data on the Clipboard.
For the verification point to pass, the location of the region and the screen resolution
should be the same during record and playback.
Masks are used to "hide" the underlying masked area from comparison when scripts are
played back.
Use masks to ensure that certain regions will not be tested.
Application has a date field, user might want to mask it so that it won't produce a failure
every time the script is played back.
Similar to Region Image verification point, but the user needs to point to the particular
window instead of specifying the co-ordinates of the image.
Note : Use Region Image and Window Image verification points only when verification
cannot be accomplished using object or window properties.
Checks that the specified window is displayed before continuing with the playback.
The status can be normal, minimized, maximized, or hidden.
File Comparison
Compares two specified files during playback. The comparison is based on the contents
of the files and their sizes, not on the file names or dates.
File Existence
Verifies the existence of a specified file during playback. When you create the
verification point, you specify the drive, directory, and file names.
Checks the contents of a website with every revision and ensures that changes have not
resulted in defects. You can check for the following:
– Internal and external links not found
– Pages with broken links or pages that have moved
– Orphans, viruses, and assertions
– ActiveScan entries
– Slowly downloading pages
When you record, you use Robot to scan your Web site through SiteCheck, which is the
Robot component for managing your intranet or World Wide Web site.
During playback, you can identify changes or unintentional errors in your Web site as it
evolves. This lets you correct errors before your site becomes public.
When you play back a Web Site Scan verification point, SiteCheck scans the site based
on the options that you selected when you recorded the verification point. If it finds any
defects, the verification point fails.
After you play back a Web Site Scan verification point, you can view the playback results
in the TestManager log.
Compares a baseline of a web site and compares it to the web site at another point in
time.
The SiteCheck Site Comparison Report details the difference between two sites and
provides basic site statistics for each site. For example, if you develop a Web site locally
and then move changes to your live Web site, you can compare the local version with the
live Web site to check for defects.
When you play back a Web Site Compare verification point, SiteCheck starts and
compares the baseline you selected with another Web site you selected when you
recorded the verification point. If it finds any defects, the verification point fails.
After you play back a Web Site Compare verification point, you can view the playback
results in the TestManager log.
Enhance the script:
Shell Scripting
Shell Scripting is used to group scripts into a single script. Shell Script plays back other
scripts in sequence.
The results from all scripts are stored in the same log, which simplifies results analysis.
To create a shell script, Click File > New > GUI Shell Script ,name the script and select
the scripts you want to add to the shell script.
The shell script contains a CallScript command followed by the name of each script that
you included.
Using Object Scripting commands to access objects and properties from within a script.
These commands let you work with an object’s properties. The Object Scripting
commands can only be used programmatically. Robot does not generate these commands
during recording.
SQAWaitForObject - Pause execution of the script until the specified object can be
found.
These commands let you access information in a database from Robot script.
SQLRetrieve - Return the results of a select that was executed by SQLExecQuery into a
user-provided array.
Datapool:
Facilitates running the same test with different data and avoid hard coding in the script.
Datapool…:
These commands require that you include the header file SQAUTIL.SBH with the
SQABasic command '$Include.
Example:This example opens a datapool named repo_dp1, moves the cursor to the next
row, retrieves the value from column 1, and then closes the datapool.
'$Include "sqautil.sbh"
DIM dp_id as Long
DIM dp_Result as Long
dp_id = SQADatapoolOpen ("repo_dp1", FALSE, SQA_DP_SEQUENTIAL,FALSE)
dp_Result = SQADatapoolFetch (dp_id)
dp_Result = SQADatapoolValue (dp_id, 1, dp_Value)
dp_Result = SQADatapoolClose (dp_id)
Robot includes a complete, built-in debugging environment to assist you during the
development phase of your GUI scripts
Breakpoints
Step Commands
Step (Go)
Step Into
Animate
Animate: Use to play back the active script, displaying a yellow arrow in the left margin
of each line (or highlighting the line) as it executes.
View Variables: Use the Variables window to examine variable and constant values as
you play back GUI scripts during debugging.
Rational Robot stores an expected result with the recorded test script
Rational Robot compares the actual result to the stored, expected result
Rational Robot reports the comparison output as PASS or FAIL in Rational Test
manager.
Click View -> Verification Point to analyze the failure of verification point in a
Comparator
You can use Rational ClearQuest with TestManager to track and manage defects and
change requests. With TestManager, you can submit
Rational Robot can also be used for load and performance testing.
Robot records all of a client's requests to the server and all of the server's responses from
the time you begin recording until the
time you stop recording
Use Rational TestManager to playback Virtual User (VU) script commands to determine
an application's performance speed and to detect
Plan, track and execute regression testing through IBM Rational TestManager.
The Basic-based language is much more intuitive-whether someone has programming
language experience or not.
No GUI map – Test scripts (object names) need to be updated manually for every new
build.
Result Log file – As default generated Result Log File output is not easy-to-read, after
recording, log file messages need to be
Advanced script – After recording Robot script needs to be modified before playback