Associating a value in a test with a datapool column

To cause your test to use variable data instead of a specific value, you associate values in the test with columns in a datapool.

The following instructions assume that the datapool you want to use exists and that you have added to your test a reference to the datapool. For instructions on these operations, see Creating test data and Enabling a test to use a datapool.

To associate a value in a test with a column of data in a datapool:
  1. Open the test.
  2. Locate and click a request containing a value that you want to replace with variable data.

    Clicking a test page shows you a table listing any datapool candidates and correlated data in that page. (To display correlated data as well as datapool candidates in this table, right-click in any Test Data table in the test and select Show References.) References appear in red lettering while datapool candidates appear in regular black lettering.
    table with one black row

    If the content of the Value column corresponds exactly with column data in your datapool, click the row and then click the Datapool Variable button under the table: the Select datapool column dialog box shown in step 6 opens. Skip to step 7. You can ignore step 9 because URL encoding is preselected.

    Otherwise, double-click the row to navigate to the page request containing the value that you want to datapool, and continue to the next step.

    You might want to substitute a value from a datapool that does not appear in any page table. In this case, manually locate the request string that includes the value.

  3. If the value you want to datapool is part of a string that has been designated a datapool candidate, you must remove the light green highlight: right-click and select Clear Reference. For example, if you searched for doe, john in your test, the datapool candidate in your test appears in the format doe%2C+john. If, instead of associating this candidate with a single datapool column containing data of the format doe, john, you want to associate doe and john with separate datapool columns, you must first remove the light green highlight.
  4. Highlight the value: with the left button pressed, drag your mouse over it.
  5. Right-click the highlighted value and select Substitute from > Datapool Variable.

    The Select datapool column dialog box opens.

    If you want to use an existing datapool that is not listed, click Add Datapool: the Import Datapool dialog box explained in Enabling a test to use a datapool opens.

  6. Click the name of the column that you want to associate with the test value.
  7. Click Use Column.

    To indicate that the association has been set, the highlight of the selected test value turns dark green, and the datapool table for this page is updated as illustrated in the figure.
    table with two green rows

  8. (Optional) Encode the datapooled value.

    If a datapool substitution contains special characters such as space or comma, click the appropriate row and check URL Encode. You can also right-click the datapooled value in the request (step 6) and select URL Encode. When URL encoding is selected, special characters are encoded: for example, a space-separated value in a datapool column such as John Doe is substituted as John%20Doe. When URL encoding is not selected, substitutions from the datapool are literal. You should not enable URL encoding for datapools that contain data that has already been encoded.

  9. Repeat these steps as many times as needed and save the test.

Parent topic: Providing tests with variable data

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