Associating a test value with a datapool column

After you have created a datapool and have enabled your test to use the datapool, you associate a specific value in the test with a specific datapool column.

About this task

To associate a value in a test with a datapool column:

Procedure

  1. In the Test Navigator, browse to the test and double-click it. The test opens.
  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 that lists any datapool candidates and correlated data in that page. (If correlated data is not displayed, right-click the table and verify that Show References is selected.) References are shown in blue letters, and datapool candidates are shown in black letters.

    table with one black row, showing one datapool candidate

    If the contents of the Value column corresponds exactly with column data in your datapool, click the row and then click Datapool Variable. The Select datapool column window opens. Skip to step 6. You can ignore step 8, because URL encoding is preselected.

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

    The value that you want to replace from a datapool might not be listed in any page table. In this case, manually locate the request string that includes the value.

  3. If the value that you want to replace from a 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 is displayed as doe%2C+john. Suppose that you do not want to associate this candidate with a single datapool column containing data in the format doe, john. Instead, you want to associate doe and john with separate datapool columns. In this case, 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 window opens.
    Note: To use a datapool that is not listed, click Add Datapool: the Import Datapool window opens.
  6. Click the name of the datapool column that you want to associate with the test value.
  7. Click Use Column.

    To indicate that the association has been set, the highlighting for the selected test value turns dark green, and the datapool table for this page is updated as shown in the example.

    table with two green rows

  8. Optional: Encode variable data when it is substituted from a datapool.

    If a test value contains special characters such as spaces or commas, click the row and select URL Encode. With this option, special characters are encoded when variable data is substituted from a datapool. For example, data that is space-separated in a datapool column (such as John Doe) is substituted as John%20Doe. If URL encoding is not selected, the variable data that is substituted is literal. Do not enable URL encoding for datapools that contain data that is already encoded.

  9. Save the test.

Feedback