Jmeter - Random set of variables

Amit Ronen

How can I get a random set of variables in Jmeter?

For example, I set lat, long and city for New York and lat, long and city for Los Angeles. I need to post those parameters in random way, so it will be for all the set and not only one parameter for each, so when it takes the first lat and long, it will also use New York as the city.

UBIK LOAD PACK

This can be done in at least 2 ways:

Using CSV DataSet Config:

  1. put the 3 variables separated by ';' in a CSV file

  2. use CSV Data Set Config element and put in variables:

    • variables : lat,long,city

    • Delimiter : ;

    • Sharing Mode : Thread Group

Then as you use a certain number of Threads, each one will pick a different value for the triplet and it should be fine.

Using Redis Data Set:

  • Insert in a Redis Set the triplet as 1 value using ; separator

  • Configure Redis Data Set:

    • Use Random_Keep
    • ; as separator

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related