Providing tests with variable data (datasets)
You can produce more realistic
tests by changing them to use datasets. During execution, a test
that uses a dataset replaces a value in the recorded test with variable
test data that is stored in the dataset. This substitution allows
each virtual user to generate a different request to the server.
- Dataset overview
Datasets provide tests with variable data during a run. When you record a test, you perform a sequence of steps that you expect a typical user to perform. After the recording, a test is generated that captures these interactions. When you run this test, it uses the same data that you used during recording. To vary the data in the test, you use a dataset, that contains variable data. At run time, this variable data is substituted for the data in the recorded test. - Creating a dataset associated with a test
You can create a dataset that contains variable data for tests to use when they run. This is the preferred way to create a dataset because the dataset is automatically associated with a test. You can create anything from an empty dataset that contains one column, which you can edit later, to a fully functioning dataset. - Creating a dataset in a workspace
You can create datasets in a workspace containing variable data that tests use when they run. You can use this method to create a dataset if you have not yet created the test that will use it. - Converting an existing datapool to a dataset
Starting from 9.5 the dataset formerly known as datapool is in the CSV format. You can convert any existing datapool to a dataset. - Creating datasets with multiple substitutions
Earlier to 9.2, you could substitute one dataset value at a time. Starting from 9.2, after the test is generated, you can view all the dataset candidates, add multiple candidates as dataset values, substitute values, and create a new dataset out of it. You can also substitute multiple dataset candidates for an existing dataset. - 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. - How dataset options affect values that a virtual user retrieves
The Open, Access, and Wrap modes that you select for a dataset affect the values that a virtual user retrieves. - Enabling a test to use a dataset
Before a test can use variable data from a dataset, you must update the test to include a reference to that dataset. - Associating a dataset with the test
You associate a dataset with the data in the steps of a recorded test. For instance, you record a page to create a user and the data that you enter could be user name, gender, and age. When playing back the test, you can vary the data by associating the test with a dataset. - Viewing dataset candidates when you open a test
Dataset candidates are displayed automatically when you open a test for the first time. From the dataset candidates window you can view the dataset candidates in the test, bookmark locations of interest, and add or remove dataset references. - Managing datasets
You can add, modify, or remove data from a dataset similar to the way you work with a spreadsheet using the Dataset CSV Editor. - Encrypted datasets overview
You can encrypt one or more columns in a dataset. If you want to encrypt confidential information such as a set of passwords or account numbers that are used during a test, you can use an encrypted dataset. - Navigating between a dataset and a test
After you have created a dataset or imported a comma-separate values (CSV) file into a dataset, you can navigate between the dataset and associated tests in the test editor. You can enlarge the test and the dataset, list the datasets that a test uses, navigate from a row in a dataset to the corresponding element in the test, see the data for a page or request, and add or remove dataset references.