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 captures 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 plan to create a test that searches the IBM® website 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 the test. For more information about 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 about this subject, see Associating a test value with a datapool column.

  4. Add a loop in the test to fetch the values from different rows of a datapool. A test without a loop fetches the value only from the first row of datapool.

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. The Datapools list, on the right, is empty. 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 Add Datapool, 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 a request, the datapool candidates are displayed in green in the Test Element Details area, and they are identified as such when you click 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 > Select Data Source.
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 vertical bidirectional arrow arrow, and drag it up or down while holding the left mouse button.
  • If you substitute an element of a page with a datapool column, to view the substitutions in the Page Elements report, in the Test Elements Details area of the request click the Use the substituted URL in performance reprots check box.

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 associated to a datapool, as shown in the following figure. Items that have been modified are displayed in italics; the italics are removed after you save the test.


Feedback