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.
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.
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.
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.
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.
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.
Parent topic: Providing tests with variable data