I want to pass some parameters to my request body. I don't want to send the random string. But I need to pass the random values from selected values. Ex; I have 5 values, say value1,value2,value3,value4,value5. I need to pass the random values among those five values. How can I do that? Any suggestions Please
Easy way
You can use chooseRandom function available via JMeter Plugins
Hard way
Use a Beanshell PreProcessor to get a random value as follows:
value1,value2,value3,value4,value5
into the PreProcessor's "Parameters" inputPut the following code into the PreProcessor's "Script" area
String[] params = Parameters.split(",");
Random random = new Random();
String randomValue = params[random.nextInt(params.length)];
vars.put("randomValue", randomValue);
${randomValue}
where required. See the following reference information for