Amit Ronen
Amit Ronen

Reputation: 161

Jmeter - Random set of variables

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.

Upvotes: 1

Views: 517

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34556

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

Upvotes: 1

Related Questions