background image
<< Planning and Creating a Datapool | A datapool data type >>
<< Planning and Creating a Datapool | A datapool data type >>

Generate datapool code

Planning and Creating a Datapool
303
For example, suppose your client application has a field called
Order Number
.
During recording, you type in a value for that field. With VU test scripts, the value
is assigned to a test script variable automatically. 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 that you need, record a preliminary
test script. Robot automatically captures all of the values supplied to the client
application during recording and lists them in the
DATAPOOL_CONFIG
section at
the end of the test script. For more information, see Finding Out Which Data Types
You Need
on page 306.
2
Generate datapool code.
To access a datapool at runtime, a test script must contain datapool commands,
such as commands for opening the datapool and fetching a row of data. With VU
test scripts, a
DATAPOOL_CONFIG
section must also be present. This section
contains information about how the datapool is created and accessed.
Datapool code is generated in either of the following ways:
With VU test scripts, Robot generates datapool code automatically when you
finish recording a session. Robot is aware of all the variables in the session that
are assigned values during recording, and it matches up each of these variables
with a datapool column in the test script.
To have Robot generate datapool commands automatically during recording,
make sure that
Use datapools
is selected in the
Generator
tab of the Session
Record Options dialog box before you record the test script.
Note:
You must still supply data to the datapool and enable it.
With SQABasic test scripts, you manually insert the datapool commands and
match up test script variables with datapool columns. For information about
coding datapool commands, see the
Rational Robot User's Guide
.
For information about using datapools with other script types, see the Rational
Test Script Services manual for your language.
3
Create and populate the datapool.
After the datapool commands are in the test script, you can create and populate
the datapool.
To start creating and populating a datapool for a test script that you are editing in
Robot, click
Edit > Datapool Information
.