javaparametersjmeterjmeter-5.0

Jmeter store multiple value on single parameter without using Excel file


Hello everyone is this possible that I will store multiple values on a single parameter. Each call will alter to Dog, Cat and Rabbit without using excel file. Your response is appreciated. Thank you so much

Example:

TEST-Dog

TEST-Cat

TEST-Rabbit

Expected Result: test parameter will generate account defined values


Solution

  • If you want each occurrence of the Sampler to use one of the animals as a parameter without using external files you can do it as:

    1. Define these animals as JMeter Variables via User Defined Variables configuration element

      enter image description here

    2. Wherever you want to refer the value use __RandomFromMultipleVars() function like:

      ${__RandomFromMultipleVars(value)}
      

    Demo:

    enter image description here