How do I change HTTP request name in each iteration?
Scenario: I am running a single user test for 1000+ iterations, when I run with the help of GUI, I can view the result but sampler name does not change for 1000+ iterations.
My HTTPS request name is as follows:
GetSpace- Next 1000 items
and when I run the test, my ‘View Result Tree’ looks as follows:
I want view result to show result in the following pattern:
GetSpace – Next 1000 item
GetSpace – Next 1001 item
GetSpace – Next 1002 item
GetSpace – Next 1003 item
and so on..
How do I achieve the same? With the help of parametarization or any other method.
I am using the following thread group for the test –single user:
2
Answers
You can use counter as shown below:-
Hope this helps.
Since JMeter 4.0 you have a special variable which loops like
__jm__<Name of your element>__idx
which holds the iteration number of current Loop Controller derivative (in your case Thread Group)So if you change your sampler name to look like:
You will get an incrementing number depending on current Thread Group iteration: