18 Views1 Thanks

How to loop through all the data in CSV file in JMeter

Testing Forums Testing Forums Performance Testing JMeter How to loop through all the data in CSV file in JMeter

Viewing 2 posts - 1 through 2 (of 2 total)
  • #115

    Anonymous
    Inactive

    We have one requirement where we have 20 test data in the CSV file and We want to loop through all the rows and pass variables in JMeter HTTP sampler. Do you have any better approach for this?

    #191

    Shashi Kumar
    Participant

    Hi Ashok,
    You can loop through all the data in CSV file using a while loop controller.
    1. Add a Thread Grouo
    2. Add a while controller and give condition as ${varName}. Suppose your have defined varName as variable in CSV file. You can put the same in the while controller condition
    3. Add the sampler and use the ${varName} in your sampler.

    The while controller will loop through all the rows in CSV file and assign the value of that row to the variable.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.