I'm facing problem with assigning the CSV file on the basis of loop count, not on the basis of thread count.

For example -> address1.csv, address2.csv......addressn.csv

So it is very easy to do the same using ${__threadNum} function (already tried and know about this but our requirement deals with loop count ) But i want do it on basis of loop Count like 1,2 .....n

1 Answer 1

  1. You can use __counter() function just the same way you're using __threadNum() function. The __counter() function generates an incremented number each time it's being called.
  2. Another option is going for Counter test element, if you put it inside your loop you will be able to refer incremented value by reference name. See How to Use a Counter in a JMeter Test for more details.
  3. Also be aware of __iterationNum() function, it returns current Thread Group loop number. If this is something you're looking for - you can install this function via JMeter Plugins Manager as a part of Custom JMeter Functions bundle

    JMeter Plugins Manager - Custom JMeter Functions

  • Hi....above answer quite related my question so in that 3rd one i am looking for that. so thing is in my csv data set config path is D:\datas\latandlong\IndiaAddress\address${__iterationNum}.csv mentioned in the File Name path but it is not taking... how do that one. any suggestion you have please tell me
    – SQA
    Oct 24, 2017 at 5:45
  • __iterationNum() How to use it with loop count please tell me with simple example
    – SQA
    Oct 24, 2017 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.