Here is a summary of the stages involved in preparing a datapool for use in testing.
The order shown is the typical order for planning and creating a datapool for session
scripts:
1. Plan the datapool.
Determine the datapool columns you need. In other words, what kinds of values
(names, addresses, dates, and so on) do you want to retrieve from the datapool
and send to the server?
Typically, you need a datapool column for each script variable that you plan to
assign datapool values to during recording.
For example, suppose your client application has a field called Order Number.
During recording, you type in a value for that field. With session scripts, the
value is automatically assigned to a script variable. During playback, that variable
can be assigned unique order numbers from a datapool column.
This stage requires some knowledge of the client application and the kinds of
data that it processes.
To help you determine the datapool columns you need, record a preliminary
session script. Rational Robot automatically captures all the values supplied to
the client application during recording and lists them in the DATAPOOL_CONFIG
section at the end of the script.
2. Generate datapool code.
To access a datapool at runtime, a script must contain datapool commands, such
as commands for opening the datapool and fetching a row of data. With session
scripts, a
DATAPOOL_CONFIG
section must also be present. This section
contains a variety of information about how the datapool is created and accessed.
Datapool code is generated in either of these ways:
�
With session scripts, Robot generates datapool code automatically when you
finish recording a script. Robot is aware of all the variables in the script that
are assigned values during recording, and it matches up each of these
variables with a datapool column.
To have Robot generate datapool commands automatically during
recording, make sure Use datapools is selected in the Generator tab of the
Session Record Options dialog box, and then record the script.
�
With GUI scripts, you manually insert the datapool commands and match up
script variables with datapool columns.
3. Create and populate the datapool.
After the datapool commands are in the script, you can create and populate the
datapool.
To start creating and populating a datapool for a session script you are editing in
Robot, click Edit, then
Datapool Information.