DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-27
Generating Test Data
Generating Test Data
You can use DataLoader/MX, not only to load data from an existing system, but also to
create test data. DataLoader/MX has several utility procedures that help create test
data with these requirements:
•
You must be able to generate data in quantities equal to the quantity of real data.
•
You must be able to control the distribution of data so that it is representative of
real data, or at least what you believe real data will look like.
•
The data values themselves must have some resemblance to real data. For
example, a name field containing the following test data might provide the bulk and
maybe even the distribution needed, but does not resemble actual data:
AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAB
AAAAAAAAAAAAAAAAAAAAAAAAC
...
ZZZZZZZZZZZZZZZZZZZZZZZZZ
Reports designed with this data would look very different when generated with real
data. A client tool looks and operates differently when used with nonrepresentative
data.
To use DataLoader/MX to create test data, replace the default GETNEXTRECORD
user exit with one that generates data, using some of the procedures below. This
GETNEXTRECORD builds a record consisting of fields that each have one type of test
data. Each of the fields of this test data is likely to be of one of these types:
•
Constants
•
Random numbers
•
Odometers
•
Cartesian fields
Constants
Some data fields might need to have constant values. All programming languages
support constants, so DataLoader/MX does not provide utility procedures to support
constants.
Random Numbers
No computerized method exists to generate truly random numbers. What is generated
is more properly known as a pseudo-random number series, which is a series of
numbers that looks random but ultimately repeats and has a very obscure pattern.
Not only do pseudo-random numbers repeat patterns, but each one is predictable
given the previous one and the algorithm used to generate them. If a high-quality
pseudo-random number generating mechanism is chosen, such pseudo-random
numbers are almost always acceptable and are preferable to true random numbers