background image
<< What You Can Do to Guarantee Unique Row Retrieval | Generate enough datapool rows >>
<< What You Can Do to Guarantee Unique Row Retrieval | Generate enough datapool rows >>

Renaming or Copying a User-Defined Data Type

324
Chapter 11 - Working with Datapools
Note:
Rational Test can guarantee that a datapool contains unique rows only when
you generate datapool data through Robot or TestManager.
Creating a Datapool Outside Rational Test
To create a datapool file and populate it with data, you can use any text editor, such as
Windows Notepad, or any application, such as Microsoft Excel or Microsoft Access,
that can save data in .
csv
format.
For example, you can create a datapool file and type in the data, row by row and
value by value. Or, you can export data from your database into a .
csv
file that you
create with a tool such as Excel.
After you create and populate a datapool, you can use TestManager to import the
datapool into the datastore. For information about importing a datapool, see Importing
a Datapool
on page 318.
Use sequential or
shuffle access
order.
With sequential or shuffle access, each datapool row is referenced
in the row access order just once. When the last row is retrieved, the
datapool cursor either wraps or datapool access ends.
With random access, rows can be referenced in the access order
multiple times. Therefore, a given row can be retrieved multiple
times.
You can set row access order in any of these ways:
s
When editing the
DATAPOOL_CONFIG
section of a VU test
script in the Configure Datapool in Script dialog box, set
Access
Order
to
Sequential
or
Shuffle
.
s
When editing a VU test script in Robot, add
DP_SEQUENTIAL
or
DP_SHUFFLE
to the list of flags in the
flags
argument of
the
DATAPOOL_CONFIG
statement or the
datapool_open
function.
s
When editing a GUI test script in Robot, set the
sequence
argument of the
SQADatapoolOpen
command to
SQA_DP_SEQUENTIAL
or
SQA_DP_SHUFFLE
.
Do not rewind the
cursor during a
test.
If you rewind the datapool cursor during a test (through the VU
datapool_rewind
function or the SQABasic
SQADatapoolRewind
command), previously accessed rows are
fetched again.
What to do
How to do it