Adding Dataset Mapper

You can include a Dataset Mapper in a compound test or a schedule to assign the dataset values to the variables that are defined in multiple tests. In previous releases, to apply the dataset values to multiple tests, you had to associate the dataset to each test. The Dataset Mapper is able to map the dataset columns with the variables.

Before you begin

You must have created at least one dataset. See Creating a dataset in a workspace.

About this task

For the Dataset Mapper to fetch the test variables, in the Variable Details section of the Test editor, you must set the Visible In field for the variable to All tests for this user. You can also fetch the variables from the custom code calls.

If the compound test or the schedule includes a Dataset Mapper that retrieves values from one dataset and a test in the compound test or schedule is also associated with another dataset, the run uses both the datasets.
Note: When you run the schedule or compound test with a Dataset Mapper, by default the test picks up the dataset values from the first row. For the test to pick up all of the dataset values, you must put the test in a loop.

Procedure

  1. In the Schedule or Compound test editor, click Add > Dataset Mapper.
  2. In the Select Dataset dialog box, select a dataset to use for the tests and click OK.
    To change the dataset after it is associated, in Dataset Mapper Details, click Browse and select another dataset.
  3. Select whether the test will make the data in the dataset record permanent for each virtual user.

    By default, one row is retrieved from the dataset for each execution of a test, and the data in the dataset row is available to the test only for the duration of the test. Select Fetch only once per user to specify that every access of the dataset from any test being run by a particular virtual user will always return the same row.

    To illustrate how these options affect the rows that are returned, assume that a test contains a loop which accesses a dataset. The loop has two iterations. The following table shows the row that is accessed in each iteration:
    Dataset option Iteration 1 Iteration 2
    Sequential and Private row 1 row 2
    Shared and Shuffled row x row y
    Fetch only once per user row x row x
  4. In the Columns mapping table, the Column is automatically filled with the column names from the dataset.
  5. To use the variable names from the test, click the cell and click the Ellipsis button Ellipsis button and select the variable. By default, the variable names are also created with the same names as the dataset columns.
  6. If the dataset that you selected in step 2 was generated by HCL® OneTest Data, you can choose to update the data by clicking Update dataset or update the data automatically for every run by selecting the Update dataset during deployment check box.
  7. To fetch all the dataset values, put the Dataset Mapper in a loop. Select the Dadtapool Mapper in the schedule and click Insert > Loop.
  8. Save the changes.