Monday, December 5, 2011

What is Parameterization and how it is done...

Parameters can be set at both the Test Plan and Thread Group levels.

At the Test Plan level, parameters can be used as constants to minimize changes throughout the test plan when a server or port changes.
Within Thread Groups, the User Parameters Pre-Processor can be used to set different parameters for each simulated user.

Parameterization can be done in two ways.

1)                      Using CSV data set config:
 The CSV Dataset module allows data to be stored in a CSV file on disk. This is read in at runtime and the data is available in variables in the test plan. This makes it easy to change the data "behind" the test application. By keeping the tests generic to the software and the actual info about the data being tested in CSV files, these CSV files can be easily replaced to use a another application dataset. Using sets of CSV files, we can then have test for variations of data, such as production, test or development.

2)                      Using User Parameters:
This allows specifying values for User Variables specific to individual threads.

User Variables can also be specified in the Test Plan but not specific to individual threads. This panel allows you to specify a series of values for any User Variable. For each thread, the variable will be assigned one of the values from the series in sequence. If there are more threads than values, the values get re-used. For example, this can be used to assign a distinct user id to be used by each thread. User variables can be referenced in any field of any JMeter Component.