Enabling a test to use a datapool

A test must contain a reference to any datapool that it uses.

For an explanation of datapool creation and editing, see Creating test data.
To allow a test to use a datapool:
  1. Open the test.
  2. In the Test Contents area on the left, right-click the first line (test name) and select Add > Datapool. The Import Datapool window opens, listing all datapools in your workspace that are not already being used by this test. Alternatively, you can start this dialog box from the Add Datapool button under the Datapools table in the test details on the right.Import datapool dialog box
  3. Select the datapool containing the data that you want to use, by clicking its name in the Matching Resources list box.

    All projects in your workspace are searched using the regular expression shown in the Pattern box. With the default pattern (shown in the box), all datapools in all projects are found and any that you have not previously added to this test are listed in Matching Resources.

    The In Folders box lists the project in which the datapool you selected resides. Its columns are listed by name in the Columns box and the Name box displays the simple name of the datapool. (The simple name is displayed by the Test Navigator: regular navigators display the full name with extension displayed under Matching Resources.)

  4. The Open mode determines the view that virtual users have of the datapool. Select one of the following:
    Option Description
    Shared (per machine) (default)

    Virtual users on each machine draw from a shared view of the datapool, with datapool rows apportioned to them collectively in sequential order, on a first-come-first-served basis.

    This choice makes it likely that the virtual users or loop iterations will use data from different rows and that the server will see variable data. The exact row access order among all virtual users or iterations cannot be predicted because this is dependent on the test execution order and duration on each machine.

    Private

    Each virtual user draws from a private view of the datapool, with datapool rows apportioned to each in sequential order.

    This choice offers the fastest test execution and assures that each virtual user gets the same data from the datapool in the same order, but it is the choice most likely to result in different virtual users using the same row. With this choice, rows of a datapool will increment only if you add the test(s) using the datapool(s) to a schedule loop with more than one iteration.

    Segmented (per machine)

    Virtual users on each machine draw from a segmented view of the datapool, with data apportioned to them collectively from their segment in sequential order, on a first-come-first-served basis. The segments are computed based on how a schedule apportions virtual users among machines. For example, if a schedule assigns 25% of users to group 1 and 75% to group 2, and assigns these groups to machine 1 and machine 2, the machine 1 view will consist of the first 25% of datapool rows and the machine 2 view will consist of the remaining 75% of rows.

    This is a good choice where it's important to prevent virtual users from selecting duplicate values (for example, account IDs). If you disable wrapping, no row can be used more than once.

    Note: this choice requires that the datapool contain only one equivalence class. With the other choices, equivalence classes are ignored.
  5. If you want the test to fail when the end of the datapool or datapool segment is reached, clear the check box beside Wrap when the last row is reached. If the box is checked, when the end of the datapool or segment is reached, the test starts retrieving data from the beginning.
  6. Click Select. A reference to the datapool is added to the test and the test Details are updated with the information.
  7. Save the test.
For details on how to get a test to use a datapool that you have made available to it, see Associating a test value with a datapool column.

Parent topic: Providing tests with variable data

Terms of use | Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.