User Defined Variables VS User Parameters Preprocess

You need to make scripts as dynamic and production-like as possible.

To do this, instead of using only one data set and making all your virtual users the same, we'll employ user defined variables. With these in place, a parameter can replace single static values (or a user defined variable), and this parameter (or user defined variable) can pull value from external data files, making the scenario resemble the actual production environment.

You can also import real (or other) values from an external CSV file, like so:

(data.csv) -> Save the file in the test plan folder -> Open test plan -> replace static value with a variable (as highlighted in the snapshot) - > Add a CSV data set config element -> In the CSV data set config element, enter the value (and path) of the file (data.csv) & the variable name as used.

Image: Configuring CSV data sets in JMeter Pro.

Image: Configuring CSV data sets in JMeter Pro.

Click here to go to the next page .