skip to Main Content

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

enter image description here

and when I run the test, my ‘View Result Tree’ looks as follows:

enter image description here

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:

enter image description here

2

Answers


  1. You can use counter as shown below:-

    HTTP Request1_100${__counter(,)}
    

    enter image description here

    Hope this helps.

    Login or Signup to reply.
  2. 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:

    GetSpace - Next ${__jm__Next Thread Group(GetSpace)__idx} items
    

    You will get an incrementing number depending on current Thread Group iteration:

    JMeter Thread Group Iteration

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search