Is there a way to generate random parameter values in jMeter http request sampler or any other sampler?
Create a Test Plan First For JMeter Post Requests Just right click on Test Plan and then click on the element by following this path: Threads (Users) -> Thread Group. Your Thread Group should be added now. And you can keep values in Thread Properties as they are.
Use HTTP request defaults. This config element is used when all requests in the JMeter script are sent to the same server. This way, when you create a new HTTP request you only need to specify the method, path you want to reach and parameters if it's needed. Add an HTTP Cookie manager to the root of the test plan.
In JMeter, you can use counters
to generate parameter values. Add your counter
to the top of your test plan and choose initial
, increment
and maximum
values. It will start counting automatically.
counter
is in Pre Processors
menu. You can use the counter values in HTTP samplers by using reference name
. i.e. let's say your reference name is ref_counter
then you can call its values in HTTP samplers with ${ref_counter}
.
You can try to use some of jmeter's functions to generate random value:
${__Random(MIN, MAX}
;${__RandomString(LENGTH)}
;as well as Random Variable config element for the same purpose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With