I have a sample request like a bellow
{
"schema": "urn:com.xyx9723.syodhnc:bulk.v1",
"version": "7-06-26201",
"msg": [
{
"topic": "tags/kdhud/${ID}/sadknnf",
"ids": [
{
"_time": "2107-09-09 13:13:12",
"id": "TID-2153656--00089312121"
},
{
"_time": "2107-09-09 13:13:12",
"id": "TID-2153656-00089312122"
},
{
"_time": "2107-09-09 13:13:12",
"id": "TID-2153656-00089312123"
},
{
"_time": "2107-09-09 13:13:12",
"id": "TID-2153656-00089312124"
}
]
}
]
}
When it comes to real test I have to send request with 100 IDS with increment values like (TID-2153656--00089312121, TID-2153656--00089312122, TID-2153656--00089312123 .... etc)
How to give incremental value in the request while sending a request in JMeter.
What Is a Counter in JMeter? A counter in JMeter is an element that allows you to generate an incremental value. This allows you to reference the value from anywhere within a thread group.
Specify Thread lifetime If selected, confines Thread operation time to the given bounds. Duration (seconds) If the scheduler checkbox is selected, one can choose a relative end time. JMeter will use this to calculate the End Time.
Initialize somewhere variable id and then use it inside request several times, it will increase value with every occur:
${__intSum(${id},1,id)}
Use Counter
. Starts wìth 00089312121
Increment by 1
save in Reference Name cnt
and Number Format 00000000
Inside your request call it with prefix:
TID-2153656-${cnt}
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