Datapool overview

Datapools provide tests with variable data during a run.

When you record a test, you perform a sequence of steps that you expect a typical user to perform. From the recording, a test is generated that exactly mirrors these interactions. When you run this test, it uses the same data that you used during recording. To vary the data in the test, you use a datapool, which contains variable data. At run time, this variable data is substituted for the data in the recorded test.

Assume that you want to create a test that searches IBM's Web site for three items: IBM® Rational® Performance Tester, IBM Rational Functional Tester, and IBM Rational Manual Tester. Here is what to do.
  1. Record a test that searches for one item.
  2. Create the datapool and associate it with a test. For more information on this subject, see Creating a datapool associated with a test.
  3. Associate a particular request in the test with a particular column in the datapool. For more information on this subject, see Associating a test value with a datapool column.

Create the datapool. Create a datapool with three items. The following figure shows a datapool called Search in IBM.

representation of datapool in Performance Tester

Record a test. Type the Web address www.ibm.com/us/, search for IBM Rational Performance Tester, and stop recording. The following figure shows the test that is generated. Note that the Datapools list, on the right, is empty. This is because the test is not yet associated with a datapool.

test accessing IBM's US home page

Associate the test with the datapool. To associate a test with a datapool, click the Add Datapool button, and select the datapool. The following figure, which now contains a datapool in the Datapools list, shows the expanded test. The test elements that have a yellow background contain data that can be substituted or is already substituted (by either a datapool or data correlation, which is not discussed here).

test with associated datapool

Associate a particular request with a particular column in the datapool. When you click on a request, the datapool candidates appear in green in the Test Element Details area, and they are identified as such when you click on them. The following figure identifies IBM+Rational+Performance+Tester as a datapool candidate. To associate IBM+Rational+Performance+Tester with a datapool column, select it, right-click, and click Substitute from > Datapool Variable.
Note: If part of the Test Element Details area is obscured, move your cursor over one of the blue lines until it changes to a , and drag up or down while holding the left mouse button.

After you have associated the request with the datapool column, IBM+Rational+Performance+Tester changes to a dark green background to indicate that it is datapooled, as shown in the following figure. Items that have been modified appear in italics; the italics are removed after you save the test.


Feedback