Load Testing by Example - Creating a Dataset - Web Performance
Menu

Load Testing by Example

Creating a Dataset

Read and post comments

Overview

This tutorial demonstrates how to create a dataset. A dataset is used to configure fields to use dynamic values during a load test. This will typically correspond to data that the simulated user should enter into form fields on a page.

Prerequesites: This guide assumes a basic understanding of the Load Tester product. The Load Tester videos are a good introduction to the main features. It is assumed you have recorded a testcase.

Please note that this tutorial is based on Load Tester 3.5. The procedure is similar in other versions, but the details may vary slightly.

There are a few basic steps:
  1. Create a dataset or import it
  2. Populate the dataset, either manually or by filling each column with generated data
  3. Configure the dataset properties

Create a dataset

The first step is to create the dataset. From the pop-up menu in the Navigator view, choose the New DataSet... option.

create dataset

Next, supply a name for the dataset. Press the Add button to add the first field and double-click the first row in the Fields list. After entering the field name, press the Enter key if you have more fields to add. Press the OK button when you are done.

create dataset fields

In this example, the dataset has four fields that will be used in a testcase that adds a user to a system. After creating the new dataset, it will look like this:

the new dataset

You can double-click a cell to edit the contents of that cell. Pressing the Enter key will move to the next cell. Ad the end of the last row, it will create a new row. An entire dataset may be populated this way if needed. For larger datasets, importing or generating the data is more practical.

Populate the dataset with generated data

A dataset is populated one field (column) at a time. Select the field by pressing the column header and then press the Fill... button.

The Fill Dataset Field dialog provides several methods of filling the field. For the username and password fields, we will use a sequential fill, as shown below. The random method might also be useful here, but it can be handy to have know values for usernames and passwords when it is necessary to login o the system using those identities to verify the operation of a testcase. After filling in the fields and pressing the Generate button, the data is displayed. After pressing OK, it will be copied into the dataset field.

fill dataset by sequence

For the first_name and last_name fields, we will use a list fill. In the example below, we have selected a list of first names and will randomize the list.

fill dataset from list

After filling all the fields, the dataset looks like this:

filled dataset

Import a dataset from a text file

To import a dataset from a file, select the Import... option from the pop-up menu in the Navigator view (similar to dataset creation demonstrated above). Depending on the format of the file, the options may be different than shown below.

dataset import dialog

After importing the file, the dataset will look like this:

imported dataset

Note that the dataset can be re-imported instantly with the Reload button. To re-import with slightly different settings, push the "..." button next to the Reload button.

Datasets can be exported using the Export option from the pop-up menu in the Navigator view.

Configure the dataset properties

Depending on how the dataset will be used, it is critical to set the Lifespan, Reusable and Sharable settings correctly.

For a description of those settigns, see the Dataset Editor section of the reference manual. From the help window (Help->Help Contents) search for "dataset".

Conclusion

Datasets provide a mechanism for supplying user-entered data to a testcase so that many VUs can be entering different data when performing the same testcase.

The use of dataset is critical for simulating user identities and most user input forms correctly.

Feedback & Comments

Comments about this report may be posted at the company blog post.

About

Christopher L Merrill
2007 Web Performance, Inc.; v1.1

Version History

v1.0 - 1st public release (12 September 2007)
v1.1 - email cleanup (23 Jan 09)

Resources

Copyright © 2024 Web Performance, Inc.

A Durham web design company

×

(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
How Many Concurrent Users