Sunteți pe pagina 1din 45

Rational Robot

What is Rational Robot?

Rational Robot is a complete set of components for automating the testing of


Microsoft Windows client / server and Internet applications running under Windows NT,
Window 98, and Windows 95.

Other Components of Robot are :

• Rational Administrator : Use to create and manage Rational repositories,


which store your testing information.
• Rational Test Manager : Use to plan your tests and manage test assets.
• Rational Log Viewer : Use to review and analyze test results.
• Object Properties, Text Grid, and Image Comparators : Use to view and
analyze results of verification point playback.
• Rational Site Check : Use to manage Internet and Intranet Websites.

Managing the Rational Repository with the Administrator :

The Rational administrator is the component that you use to create and manage
rational repositories.

The Rational repository is the component for storing application testing


information, such as scripts, verification points, queries, and defects. Each repository
consists of a database and several directories of files. All Rational Test components on
your computer update and retrieve date from the same active repository.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

Within the repository, information are categorized by projects. Projects help you
organize your testing information and resources for easy tracking. Repositories and
projects are created in the Rational Administrator, usually by some one with administrator
privileges.

Use the Administrator to :

• Create and delete a repository


• Connect to a repository
• Configures SQL Anywhere in database server
• Create and manage users, groups and computers for a Regional Test
database.
• Create and manage projects containing Requisite Pro database and Rose
models.
• Manage security privileges for the entire the Rational repository.
• Change Rational Test and Clear Quest database types.
• Use the centralize Rational Test, Rational Requisite Pro, and Rational
Rose data store using the Rational Synchronizer. (The Rational
Synchronizer is available only with Rational Suite Test Studio).

Planning and Managing Tests in Test Manager

Rational Test Manager is the component that you use to plan your test, manage
your test assets and run queries and reports.

Use Test Manager to :

• Plan Scripts and Schedules – A script is a file that is created when you record in
Robot. A schedule contains scripts, information about how and where to run the

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

script and how to coordinate script playback. (Schedules are used in Load Test,
which is available only in Rational Performance Studio).
• Create, Manage and run queries – The query tools in TestManager help you
manager your’ scripts, schedules and sessions. You can use the default queries
provided with TestManager or create queries of your own.
• Create, Manage and run reports – The reporting tools help you track assets
such as script, builds, and test documents. They also help you track test coverage
and progress.
• Create and Manage builds, log folders, and logs – Logs are created when you
play back a script in Robot. Log folders are used to organize logs.
• Create and Manage datapools and data type – A datapool supplies data values
to variable in a script during script playback. A data type is a source of data for
one datapool column.

Developing Tests in Robot

Robot is the tool that you use to develop two kinds of scripts : GUI scripts for
functional testing and virtual user scripts for performance testing.

Note: Virtual user scripts are available only in Rational Performance Studio.

Use Robot to :
• Perform full functional testing – Record and play back scripts that navigate
through your application and tests the state of objects through verification points.
• Perform full performance testing – Use Robot and Load Test 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 and VU scripting environments –
The Robot editor provide color-coded commands with keyword Help for powerful
integrated programming during script development. (VU scripting is available
only in Rational Performance Studio).

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

• Test applications developed with IDEs such as Visual Basic, Oracle Forms
PowerBuilder, HTML and Java. You can test objects even if they are not visible in
the application interface.

• Collect diagnostic information during script playback Robot is integrated with


Rational Purify, Rational Visual Quantify and Rational Visual Pure coverage,
which let you instrument certain types of applications.

The Objects oriented recording technology in Robot lets you generate scripts 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.

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

In Functional testing, Robot provides many types of verification points for testing
the state of the objects in your application. For example, you use the Object Properties
verification point to capture the properties of an object during recording and to compare
these properties during play back.

Creating Datapools

A datapool is source of test data that scripts can draw from during play back.

If a script sends data to a server during playback, consider using a datapool as the source
of the data. By accessing a datapool, a script transaction that is executed multiple times
during playback can send realistic data and even unique data to the server each time. If
you do not use a datapool, the same data (you recorded is sent each time the transaction).

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

When creating a datapool, you specify the kinds of data (called data types) that
the script will send – for example, customer names, addresses, and unique order numbers.
When you finish defining the datapool, Test Manager automatically generates the number
of rows of data that you specify.

Test Manager is shipped with many commonly used data types. In addition, Test
Manager lets you create your own data types.

The following figure shows a datapool being defined. Note that most of the data
types in the Type column are standard data types shipped with Test Manager. Two data
types, Product List and Color List, are user defined data types.

Analyzing Results in the Log Viewer and Comparators :

The Rational Log Viewers is the component that you use to view the logs that are
created when you play back scripts in Robot, run schedules in Load Test.

• View the playback results – including verification point failures, procedural


failures, aborts, and any additional playback information. Reviewing the
playback results in the Log Viewer reveals whether each script and
verification point passed or failed.

Use the Comparators to :

Analyze the results of verification points - to determine why a script may have failed.
Robot includes four comparators :
- Object Properties Comparator
- Text Comparator
- Grid Comparator
- Image Comparator.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

When you double click the line that contains the failed Objects Properties
verification point, the Object Properties Comparator opens and shows the result. In the
Comparator, the baselines column shows the original recording and the actual column
shows the playback that failed. Compare the two files to determine whether the difference
is an intentional change in the application or a defect.

Managing Intranet and Web Sites with Site Check and Robot

Rational Site Check is the component that you use to test the structural integrity
of your internet or World Wide Web Site. It is designed to help you view, track and
maintain your rapidly changing site.

Use Site Check to :


• Visualize the structure of your Web site and display the relationship
between each page and the rest of the site.

• Identify and analyse Web pages with active content, such as forms, Java,
Java Script, Active X and Visual Basic Script (VBScript)

• Filter information – so that you can inspect specific file type and defects,
including broken links.

• Examine and edit the source code - for any Web page, with color – coded
text.

• Update and repair files using the integrated editor, or configure your
favourite HTML editor to perform modifications to HTML files.

• Perform comprehensive testing of secure Web sites – Site Check provides


Secure Socket Layer (SSL) support, proxy server configuration, and support
for multiple password realms.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

Robot has two verification points for use with Web Sites :

• Use the Web Site Scan verification point to check the content of your Web Site
with every revision and ensure that changes have not resulted in defects.

• Use the Web Site Compare verification point to capture a baseline of your Web
site and compare it to the Web site at another point in time.

Using Robot with Other Rational Products

Rational Robot is integrated with many other Rational products and components
including Test Factory, Clear Quest, Purify, Visual Quantify, Visual Pure coverage, and
Load Test. The products and components are available based on what you have installed.

Testing Applications with Rational Test Factory

Rational Test Factory is a component based testing tool that automatically


generates Test factory scripts according to the application’s navigational structure.

Managing Defects with Rational Clear Quest

Rational Clear Quest is a change request management tool that tracks and
manages defects and change requests throughout the development process. With Clear
Quest, you can manage every type of change activity associated with software
development, including enhancement requests, defect reports and documentation
modifications.

Note: Clear Quest is available in Rational Suite Test Studio, Rational Performance
Studio, and Rational Team Test.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

With Robot and Clear Quest, you can

• Submit defects directly from the Log Viewer or Site Check.


• Modify and track defects and change request.
• Analyse project progress by running queries, charts, and reports.
For information about Collecting Diagnostic Information During Playback

You can use the Rational diagnostic tool to perform run time error checking,
profile application performance, and analyse code coverage during play back of a Robot
script.

Note: The Rational diagnostic tools are available in Rational Suite Test Studio.

Rational Purify is a comprehensive C/C++ run time error checking tool that
automatically pinpoints run time errors and memory leaks in all components of an
application, including third party libraries, ensuring that code is reliable.

Rational Visual Quantify is an advanced performance profile that provides


application performance analysis, enabling developers to quickly find, prioritize and
elimiminate performance bottlenecks within an application.

Rational Visual Pure-coverage is a customizable code coverage analysis tool


that provides detailed application analysis and ensure that all code has been exercised,
preventing untested code from reaching the end user.

Performance Testing with Rational Performance Studio

Rational performance studio is a sophisticated tool for automating performance


tests on client / server system. A client / server system include client applications
accessing a database or application server and browsers accessing a Web Server.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

Rational Performance Studio includes Rational Robot Load Test. Use Robot to
record client / server conversation and store them in scrips. Use Load Test to schedule
and play back the script. During playback, Load Test can emulate hundred, even
thousands, of user placing heavy loads and stress on your database and Web servers.

With performance Studio, you can :

• Find out if your system – under – test performs adequately.


• Monitor and analyze the response times that user actually experience under
different usage scenarios.
• Test the capacity, performance and stability of your server under real world user
loads.
• Discover your server’s break point and how to more beyond it.

Recording GUI Scripts


The chapter explains the recording process and tells you how to record GUI
scripts in Rational Robot. It includes the following topics :

• The recording process


• The recording workflow
• Guidelines before you begin recording
• Enabling IDE applications for testing
• Setting GUI recording options
• Using advanced features before recording
• Recording a new GUI script
• Defining script properties
• Coding a GUI script manually
• Testing your recorded script
• Creating shell scripts to play back scripts in sequence.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

When you record a GUI script, Robot records

• Your actions as you use the application under test. These user actions include
keystrokes and mouse clicks that help you navigate through the application.
• Verification points that you insert to capture and save information about specific
objects. A verification point is a point in a script that you create to confirm the
state of an object across builds. During recording the verification point captures
object information and stores it as the baseline. During play back, the verification
point recaptures the object information and compares it to the baseline.

The recorded GUI script establishes the baseline of expected behaviour for the
application under test. When new builds of the application become available, you can
play back the script to test the builds against the established baseline in a fraction of the
time that it would take to perform the testing manually.

The Recording Workflow


Typically, when you record a GUI script, your goal is to :

• Record actions that an actual user might perform (for example, clicking a menu
command or selecting a check box).

• Create verification points to confirm the state of objects across builds of the
application under test (for example, the properties of an object or the text in an
entry field).

Guidelines Before You Begin Recording


You should plan to use Robot at the earliest stages of the application development
and testing process. If any Windows GUI objects such as menus and dialogue become

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

exist with the initial builds of your application you can use Robot to record the
corresponding verification points.

Consider the following guidelines before you begin recording :


• Establish predictable start and end states for your scripts
• Set up your test environment
• Create modular scripts
• Plan your scripts in Rational Test Manager
• Enable your applications for testing

These guidelines are described in more detail in the following sections.

Establishing Predictable Start and End States for Scripts

By starting and ending the recording at a common point, scripts can be played
back in any order, with no script being dependent on where another script ends. For
example, you can start and end each script at the Windows desktop or at the main
window of the application under test.

Setting up your test environment

Whatever windows are open, active, or displayed when you begin recording
should be open, active or displayed when you stop recording. This applies to all
applications including Windows Explorer, e-mail and so on.

Robot can record the sizes and positions of all open windows when you start
recording based on the recording options settings. During playback, Robot attempts to
restore windows to their recorded states, and inserts a warning the log if it cannot find a
recorded window.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

In general remove any unnecessary applications from the Windows desktop


before you start to record. For stress testing, however, you may want to deliberately
increase the load on the test environment by having many applications open.

Creating Modular Scripts

Rather than defining a long sequence of actions in one GUI script, you should
define scripts that are short and modular. Keep your scripts focused on a specific area of
testing – for example, on one dialogue box or on a related set of recurring actions.

When you need more comprehensive testing, modular scripts can easily be called
from or copied into other scripts. They can also be grouped into shell scripts, which are
top level, ordered groups of scripts.

The benefits of modular scripts are:


• They can be called, copied, or combined into shell scripts
• They can be easily modified or re-recorded if the developers make international
changes to the application under test.
• They are easier to debug.

Planning Scripts in Test Manager

Planning scripts and defining script properties are important parts of the test
planning process. You typically define a script’s properties in Test Manager before you
record the script in Robot. You can then start Robot, select a planned script, and start
recording.

• Script propertiì¥Á127 1212ð¿12121212121212121212121212É ミ 1212

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

13bjbjUU131313131313131313131313131313131313 13%Â13137|13137|1313-
Œ131313131313131313131313131313131313131313131313131313ÿÿ¤1
3131
3131
3131
3131
3ÿÿ¤131313131313131313ÿÿ¤1313131313131313131313131313131313l1313131313Þ
131313131313Þ 1313Þ 131313131313Þ 131313131313¢
13131
3131
313
¢1
3131
3131
313
¢1
313
µ1313131313131313131313¶131313131313ª,1
31313131313ª,131313131313ª,13138131313â,131313ì¥Á137 1313ð¿1313→
13131313131313131313É ミ 1313

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

• 14bjbjUU141414141414141414141414141414141414 14%Â14147|14147|
1414-Œ141414141414141414141414141414141414141414141414
141414ÿÿ¤141
4141
4141
4141
414ÿÿ
¤141
414141414141414ÿÿ¤1414141414141414141414141414141414l1414141414Þ
141414141414Þ 1414Þ 141414141414Þ 141414141414¢
14141
4141
414
¢1
4141
4141
414
¢1
414
µ1414141414141414141414¶141414141414ª,1
41414141414ª,141414141414ª,14148141414â,141414ì¥Á147
1414ð¿14141414141414141414141414É ミ 1414

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

15bjbjUU151515151515151515151515151515151515 15%Â15157|15157|1515-
Œ151515151515151515151515151515151515151515151515151515ÿÿ¤1
5151
5151
5151
5151
5ÿÿ¤151515151515151515ÿÿ¤1515151515151515151515151515151515l1515151515Þ
151515151515Þ 1515Þ 151515151515Þ 151515151515¢
15151
5151
515
¢1
5151
5151
515
¢1
515
µ1515151515151515151515¶151515151515ª,1
51515151515ª,151515151515ª,15158151515â,151515ì¥Á157
1515ð¿15151515151515151515151515É ミ 1515

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

• 16bjbjUU161616161616161616161616161616161616 16%Â16167|16167|
1616-Œ161616161616161616161616161616161616161616161616
161616ÿÿ¤161
6161
6161
6161
616ÿÿ
¤161
616161616161616ÿÿ¤1616161616161616161616161616161616l1616161616Þ
161616161616Þ 1616Þ 161616161616Þ 161616161616¢
16161
6161
616
¢1
6161
6161
616
¢1
616
µ1616161616161616161616¶161616161616ª,1
61616161616ª,161616161616ª,16168161616â,161616ì¥Á167
1616ð¿16161616161616161616161616É ミ 1616

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

17bjbjUU171717171717171717171717171717171717 17%Â17177|17177|1717-
Œ171717171717171717171717171717171717171717171717171717ÿÿ¤1
7171
7171
7171
7171
7ÿÿ¤171717171717171717ÿÿ¤1717171717171717171717171717171717l1717171717Þ
171717171717Þ 1717Þ 171717171717Þ 171717171717¢
17171
7171
717
¢1
7171
7171
717
¢1
717
µ1717171717171717171717¶171717171717ª,1
71717171717ª,171717171717ª,17178171717â,171717ì¥Á177
1717ð¿17171717171717171717171717É ミ 1717

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

18bjbjUU181818181818181818181818181818181818 18%Â18187|18187|1818-
Œ1818181818181818181818→181818181818181818181818
18181
8ÿÿ¤1
8181
8181
8181
8181
8ÿÿ¤181818181818181818ÿÿ¤1818181818181818181818181818181818l1818181818Þ
181818181818Þ 1818Þ 181818181818Þ 181818181818¢
18181
8181
818
¢1
8181
8181
818
¢1
818
µ1818181818181818181818¶181818181818ª,1
81818181818ª,181818181818ª,18188181818â,181818ì¥Á187
1818ð¿18181818181818181818181818É ミ 1818

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

19bjbjUU191919191919191919191919191919191919 19%Â19197|19197|1919-
Œ191919191919191919191919191919191919191919191919191919ÿÿ¤1
9191
9191
9191
9191
9ÿÿ¤191919191919191919ÿÿ¤1919191919191919191919191919191919l1919191919Þ
191919191919Þ 1919Þ 191919191919Þ 191919191919¢
19191
9191
919
¢1
9191
9191
919
¢1
919
µ1919191919191919191919¶191919191919ª,1
91919191919ª,191919191919ª,19198191919â,191919ì¥Á197
1919ð¿19191919191919191919191919É ミ 1919

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

20bjbjUU202020202020202020202020202020202020 20%Â20207|20207|2020-
Œ202020202020202020202020202020202020202020202020202020ÿÿ¤2
0202
0202
0202
0202
0ÿÿ¤202020202020202020ÿÿ¤2020202020202020202020202020202020l2020202020Þ
202020202020Þ 2020Þ 202020202020Þ 202020202020¢
20202
0202
020
¢2
0202
0202
020
¢2
020
µ2020202020202020202020¶202020202020ª,2
02020202020ª,202020202020ª,20208202020â,202020ì¥Á207
2020ð¿20202020202020202020202020É ミ 2020

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- 21bjbjUU212121212121212121212121212121212121 21%Â21217|
21217|2121-
Œ2121212121212121212121212121212121212121212121212
12121ÿÿ¤212
1212
1212
1212
121ÿÿ
¤212
1212
1212
1212121ÿÿ¤2121212121212121212121212121212121l2121212121Þ
212121212121Þ 2121Þ 212121212121Þ 212121212121¢
21212
1212
121
¢2
1212
1212
121
¢2
121
µ2121212121212121212121¶212121212121ª,2
12121212121ª,212121212121ª,21218212121â,212121ì¥Á217
2121ð¿21212121212121212121212121É ミ 2121

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

22bjbjUU222222222222222222222222222222222222 22%Â22227|22227|2222-
Œ222222222222222222222222222222222222222222222222222222ÿÿ¤2
2222
2222
2222
2222
2ÿÿ¤222222222222222222ÿÿ¤2222222222222222222222222222222222l2222222222Þ
222222222222Þ 2222Þ 222222222222Þ 222222222222¢
22222
2222
222
¢2
2222
2222
222
¢2
222
µ2222222222222222222222¶222222222222ª,2
22222222222ª,222222222222ª,22228222222â,222222ì¥Á227
2222ð¿22222222222222222222222222É ミ 2222

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

23bjbjUU232323232323232323232323232323232323 23%Â23237|23237|2323-
Œ232323232323232323232323232323232323232323232323232323ÿÿ¤2
3232
3232
3232
3232
3ÿÿ¤232323232323232323ÿÿ¤2323232323232323232323232323232323l2323232323Þ
232323232323Þ 2323Þ 232323232323Þ 232323232323¢
23232
3232
323
¢2
3232
3232
323
¢2
323
µ2323232323232323232323¶232323232323ª,2
32323232323ª,232323232323ª,23238232323â,232323ì¥Á237
2323ð¿23232323232323232323232323É ミ 2323

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- 24bjbjUU242424242424242424242424242424242424 24%Â24247|
24247|2424-
Œ2424242424242424242424242424242424242424242424242
42424ÿÿ¤242
4242
4242
4242
424ÿÿ
¤242
4242
4242
4242424ÿÿ¤2424242424242424242424242424242424l2424242424Þ
242424242424Þ 2424Þ 242424242424Þ 242424242424¢
24242
4242
424
¢2
4242
4242
424
¢2
424
µ2424242424242424242424¶242424242424ª,2
42424242424ª,242424242424ª,24248242424â,242424ì¥Á247
2424ð¿24242424242424242424242424É ミ 2424

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

25bjbjUU252525252525252525252525252525252525 25%Â25257|25257|2525-
Œ252525252525252525252525252525252525252525252525252525ÿÿ¤2
5252
5252
5252
5252
5ÿÿ¤252525252525252525ÿÿ¤2525252525252525252525252525252525l2525252525Þ
252525252525Þ 2525Þ 252525252525Þ 252525252525¢
25252
5252
525
¢2
5252
5252
525
¢2
525
µ2525252525252525252525¶252525252525ª,2
52525252525ª,252525252525ª,25258252525â,252525ì¥Á257
2525ð¿25252525252525252525252525É ミ 2525

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

26bjbjUU262626262626262626262626262626262626 26%Â26267|26267|2626-
Œ262626262626262626262626262626262626262626262626262626ÿÿ¤2
6262
6262
6262
6262
6ÿÿ¤262626262626262626ÿÿ¤2626262626262626262626262626262626l2626262626Þ
262626262626Þ 2626Þ 262626262626Þ 262626262626¢
26262
6262
626
¢2
6262
6262
626
¢2
626
µ2626262626262626262626¶262626262626ª,2
62626262626ª,262626262626ª,26268262626â,262626ì¥Á267
2626ð¿26262626262626262626262626É ミ 2626

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- 27bjbjUU272727272727272727272727272727272727 27%Â27277|
27277|2727-
Œ2727272727272727272727272727272727272727272727272
72727ÿÿ¤272
7272
7272
7272
727ÿÿ
¤272
7272
7272
7272727ÿÿ¤2727272727272727272727272727272727l2727272727Þ
272727272727Þ 2727Þ 272727272727Þ 272727272727¢
27272
7272
727
¢2
7272
7272
727
¢2
727
µ2727272727272727272727¶272727272727ª,2
72727272727ª,272727272727ª,27278272727â,272727ì¥Á277
2727ð¿27272727272727272727272727É ミ 2727

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- 28bjbjUU282828282828282828282828282828282828 28%Â28287|
28287|2828-
Œ2828282828282828282828282828282828282828282828282
82828ÿÿ¤282
8282
8282
8282
828ÿÿ
¤282
8282
8282
8282828ÿÿ¤2828282828282828282828282828282828l2828282828Þ
282828282828Þ 2828Þ 282828282828Þ 282828282828¢
28282
8282
828
¢2
8282
8282
828
¢2
828
µ2828282828282828282828¶282828282828ª,2
82828282828ª,282828282828ª,28288282828â,282828ì¥Á287
2828ð¿28282828282828282828282828É ミ 2828

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

29bjbjUU292929292929292929292929292929292929 29%Â29297|29297|2929-
Œ292929292929292929292929292929292929292929292929292929ÿÿ¤2
9292
9292
9292
9292
9ÿÿ¤292929292929292929ÿÿ¤2929292929292929292929292929292929l2929292929Þ
292929292929Þ 2929Þ 292929292929Þ 292929292929¢
29292
9292
929
¢2
9292
9292
929
¢2
929
µ2929292929292929292929¶292929292929ª,2
92929292929ª,292929292929ª,29298292929â,292929ì¥Á297
2929ð¿29292929292929292929292929É ミ 2929

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

30bjbjUU303030303030303030303030303030303030 30%Â30307|30307|3030-
Œ303030303030303030303030303030303030303030303030303030ÿÿ¤3
0303
0303
0303
0303
0ÿÿ¤303030303030303030ÿÿ¤3030303030303030303030303030303030l3030303030Þ
303030303030Þ 3030Þ 303030303030Þ 303030303030¢
30303
0303
030
¢3
0303
0303
030
¢3
030
µ3030303030303030303030¶303030303030ª,3
03030303030ª,303030303030ª,30308303030â,303030ì¥Á307
3030ð¿30303030303030303030303030É ミ 3030

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- 31bjbjUU313131313131313131313131313131313131 31%Â31317|31317|3131-
Œ313131313131313131313131313131313131313131313131313131ÿÿ¤3
1313
1313
1313
1313
1ÿÿ¤3
13131313131313131ÿÿ¤3131313131313131313131313131313131l3131313131Þ
313131313131Þ 3131Þ 313131313131Þ 313131313131¢
31313
1313
131
¢3
1313
1313
131
¢3
131
µ3131313131313131313131¶313131313131ª,3
13131313131ª,313131313131ª,31318313131â,313131ì¥Á317
3131ð¿31313131313131313131313131É ミ 3131

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

32bjbjUU323232323232323232323232323232323232 32%Â32327|32327|
3232-Œ323232323232323232323232323232323232323232323232
323232ÿÿ¤323
2323
2323
2323
232ÿÿ
¤323
232323232323232ÿÿ¤3232323232323232323232323232323232l3232323232Þ
323232323232Þ 3232Þ 323232323232Þ 323232323232¢
32323
2323
232
¢3
2323
2323
232
¢3
232
µ3232323232323232323232¶323232323232ª,3
23232323232ª,323232323232ª,32328323232â,323232ì¥Á327
3232ð¿32323232323232323232323232É ミ 3232

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

1. 33bjbjUU333333333333333333333333333333333333 33%Â33337|33337|3333-
Œ333333333333333333333333333333333333333333333333333333ÿÿ¤3
3333
3333
3333
3333
3ÿÿ¤3
33333333333333333ÿÿ¤3333333333333333333333333333333333l3333333333Þ
333333333333Þ 3333Þ 3333333333→Þ 333333333333¢
33333
3333
333
¢3
3333
3333
333
¢3
333
µ3333333333333333333333¶333333333333ª,3
33333333333ª,333333333333ª,33338333333â,333333ì¥Á337
3333ð¿33333333333333333333333333É ミ 3333

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

34bjbjUU343434343434343434343434343434343434 34%Â34347|34347|3434-
Œ343434343434343434343434343434343434343434343434343434ÿÿ¤3
4343
4343
4343
43434ÿÿ¤343434343434343434ÿÿ¤3434343434343434343434343434343434l3434343434Þ
343434343434Þ 3434Þ 343434343434Þ 343434343434¢
34343
4343
434
¢3
4343
4343
434
¢3
434
µ3434343434343434343434¶343434343434ª,3
43434343434ª,343434343434ª,34348343434â,343434ì¥Á347
3434ð¿34343434343434343434343434É ミ 3434

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

35bjbjUU353535353535353535353535353535353535 35%Â35357|35357|3535-
Œ353535353535353535353535353535353535353535353535353535ÿÿ¤3
5353
5353
5353
5353
5ÿÿ¤353535353535353535ÿÿ¤3535353535353535353535353535353535l3535353535Þ
353535353535Þ 3535Þ 353535353535Þ 353535353535¢
35353
5353
535
¢3
5353
5353
535
¢3
535
µ3535353535353535353535¶353535353535ª,3
53535353535ª,353535353535ª,35358353535â,353535ì¥Á357
3535ð¿35353535353535353535353535É ミ 3535

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

36bjbjUU363636363636363636363636363636363636 36%Â36367|36367|3636-
Œ363636363636363636363636363636363636363636363636363636ÿÿ¤3
6363
6363
6363
6363
6ÿÿ¤363636363636363636ÿÿ¤3636363636363636363636363636363636l3636363636Þ
363636363636Þ 3636Þ 363636363636Þ 363636363636¢
36363
6363
636
¢3
6363
6363
636
¢3
636
µ3636363636363636363636¶363636363636ª,3
63636363636ª,363636363636ª,36368363636â,363636or example, that a window does not
exist during playback.

6. Click OK.

Inserting Timers

Robot lets you insert start timer and stop timer commands to record and write to
the log the duration of events in a script. A timer measures the time it takes to perform an
activity. For example, you may want to record the time required to perform a database
transaction on a remote server, or how long it takes the same verification point to execute
on client machines with different hardware configurations.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

You can insert any number of timers with different names into the same script to
measure a variety of separate tasks. You can nest timers within other timers (starting and
stopping the second timer before stopping the first timer), and you can overlap timers
(stopping the second timer after stopping the first timer). However, you should top a
timer before starting that same timer over again. If you start the same timer twice without
stopping it, Robot terminates the first occurrence when it starts the second.

If you do not explicitly stop a time, the timer is stopped automatically at the end
of the transactions.

When you play back a script that includes timers, you can view the elapsed time
in the log.

Uses for Timers

You can use timers to measure general application performance and specific task
performance.

Measuring General Application Performance

For general application performance, start a timer, perform a series of action and
create verification points with the application – under – test and then stop the timer.

The following is an example of using timers with verification points that have wait state
values. You use the wait water value to detect the completion of a task before stopping
the timer.

The following is an example of using timers for specific task performance testing

1. During recording, start a timer

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

2. Start an application task or transaction (for example, open an application or


start a database query)
3. Insert a verification point with a wait state (for example, insert a Window
Existence verification point that waits up to 30 second for a windows that
indicates the task is complete).
4. Stop the timer.
5. Continue recording other action to stop the recording.
After the play back the script, the log shows the timing results.

Inserting a Timer
To insert a timer while recording or editing a script :
1. Do one of the following :
- 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.
2. Click the Start Timer button on the GUI Insert toolbar.
3. Type a timer name (40 characters maximum) and click OK. If you start more than
one timer, make sure you give ach timer a different name.
4. Perform the time activity.
5. Immediately after performing the timed activity, click the Stop Timer button on
the GUI Insert tool bar.
6. Select a timer name from the list of timers you started and click OK.

Playing Back a Script that includes timers

Do the following before you play back a script that include timers:

1. Click Tools →GUI Play back options

2. In the Play back tab, clear Acknowledge results

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

This prevents a pass / fails result message box from appearing for each
verification point. You can still view the results in the log after payback.

3. In the Play back tab, set the Delay between commands value to 0.
This removes any extra Robot timing delays from the performance measurement.
If you need a delay before a single command, click Insert Delay and type a delay
value.

4. Click OK

When you play back the script and view the log in the Log Viewer, the elapsed
time is displayed for each Stop Timer event.

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:


1. Do One of the following:
- 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.
2. Click the Comment button on the GUI Insert toolbar.

Robot inserts the comment into the script proceeded 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.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

1. Highlight the text.


2. Click Edit → comment Line or Edit → Uncomment Line

Inserting Log Messages

During recording or editing, you can insert a log message, description, and result
into a GUI script. During playback, Robot inserts this information into the log. You can
use log message to document your script for the playback process.

To insert a log message into a script during recording or editing.

1. Do one of the following:


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

2. Click the Write to Log button on the GUI Insert toolbar.

After playback, you can view logs and message using the Log Viewer. The
message appears in the Log Event column. The result appears in the Result column. To
view the description, select the log even and click View → Log Event Properties. Click
the Result tab.

Inserting Delay Values

During playback of a GUI script, Robot adds a delay value between each user
action command and between each verification point command. You can set this value in
the Playback tab of the GUI Play back options dialog box.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

At times during playback, you may need to have Robot pause for a specific
amount of time before executing a particular command. For example, an additional delay
may be necessary if the application accesses a network server, printer, or other remote
system. In these cases, if script play back does not wait, it can become out of sync with
the application by executing script commands before the application is ready for them.

When you insert a delay value into a script, the script waits for that specified
amount of time before playback continues. This delay is useful when you can calculate
the amount of time needed for a process to finish before playback resumes.

NOTE: If you are testing an application in which time estimates are not predictable, you
can define a wait state for a verification point instead of inserting a delay value. With a
wait state, playback waits based on specific conditions rather than on absolute time.

To insert a delay value into a script during recording or editing:

1. Do one the following:


- If recording, click the Open Robot Window button on the GUI Record toolbar.
- If editing, position the pointer in the script.

Creating Verification Points in GUI Scripts

About 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.

Verification Points and Data Files

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

During recording, a 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 builds.

When you play back the script against a new build, Rational 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 shows the actual state of the object in
the build.

After playback the results of each verification point appear in the log in the Lov
Viewer. If a verification point fails (the baseline and actual data do not match). You can
double click the verification point in the log to open the appropriate Comparator. The
Comparator displays the baseline and actual files so that you can compare them.

Types of Verification Poitns

Alphanumeric:- Captures and tests alphanumeric data in Windows objects that contain
text, such as edit boxes, check boxes, group boxes, labels, push buttons, radio buttons,
toolbars and windows (captions). You can use the verification point to verify that text has
not changed, to trap spelling errors, and to ensure that numeric values are accurate.

Clipboard:- 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. This verification point is
useful for capturing data from spread sheet and word processing applications as well as
terminal emulators.

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. When

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

you create the verification point, you specify the drive, directory and file names. During
playback, Robot compares the files byte for byte.

File Existence:- Verifies the existence of a specified file during playback. When you
create the verification point, you specify the drive, directory and file name for the
required file. During playback, Robot checks to see if the file exists in the specified
location.

Verification point type

Region Image:- Captures a region of the screen as a bitmap. The captured region is a
pixel-by-pixel representation that includes colors, height and width.

Website Compare:- Captures a baseline of a Web site and compares it to the Web site at
another point in time.

Web site Scan:- Checks the contents of a Web site with every revision and ensures that
changes have not resulted in defects.

Window Existence:- Verifies the existence and status of a specified window during
playback. The status can be normal, minimized, maximized or hidden.

Window Image:- Captures a window as a bitmap. The captured window is a pixel-by-


pixel representation that includes colors, height and width.

Working with Datapools


This chapter describes how to create and manage datapools. It includes the following
topics.
- What is a datapool
- Planning and creating a datapool
- Data types

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- Using datapools with GUI scripts


- Managing datapools with Test Manager
- Managing user – defined data types
- Generating and retrieving unique datapool rows
- Creating a datapool outside Rational Test
- Creating column of values outside Rational Test

You should familiarize yourself with the concepts and procedure in this chapter before
you begin to work with datapools.

Note: This chapter describes datapool access from GUI scripts played back in Robot. If
you have Rational Performance Studio installed, see the datapools chapter in the using
Rational Load Test manual for information about accessing, datapools from GUI and
virtual user scripts played back in a Lord Tests schedule.

What is a Datapool?

A datapool is a test data set. It supplies data values to the variables in a script during
script play back.

Datapools automatically pump a different set of test data to a script each time a
script sends data to the server during the playback of a test. Consider using a datapool
whenever multiple records are being sent to the server in a single playback and you want
to send a diffeent record each time – for example.

- If a script transaction sends a record to the server, and the script repeats the
transaction multiple times through a loop.

- If script transaction sends a record to the server and the script is executed
multiple times through a Callscript command in a loop.

ITPF _- AUTOMATED TOOLS- Rational Robot


Rational Robot

- If multiple scripts are executed consecutively through shell script, and each
script sends the server one or more records of the same type.

If you do not use a datapool, the same literal values (the values that were captured
when you recorded the script) are sent to the server each time a record is sent to the
server during script play back.

Managing Datapool Files


A data pool consists of two files:
- Data pool values are stored in a comma – separated – value text file with a
extension.
- Data pool column names are stored in a specification file. The Robot or Test
Manager software is always responsible for creating and maintaining this file.
You should never edit this file directly.

csv. and spc files are stored in the Datapool directory of your Robot project.
Unless you import a datapool, the Robot or Test Manager software automatically
creates and manages the csv and spc files based on instructions you provide through the
user interface.
If you import a datapool you are responsible for creating the csv file and
populating it with data. However, the Rational Test software is still responsible for
creating and managing the spc file for the imported datapool.

ITPF _- AUTOMATED TOOLS- Rational Robot

S-ar putea să vă placă și