开发者

jMeter loop through all values in CSV

开发者 https://www.devze.com 2023-04-12 15:13 出处:网络
I am trying to do some test with jMeter. I have CSV file with the urls and want to iterate over all of them and make HTTP Request. I have achieved that by typing exact nu开发者_C百科mber of urls in t

I am trying to do some test with jMeter.

I have CSV file with the urls and want to iterate over all of them and make HTTP Request. I have achieved that by typing exact nu开发者_C百科mber of urls in the ThreadGroup in Loop Count field.

Is there any possibility to set jMeter in that way it will loop over the urls without the need to type count of the urls in ThreadGroup? Any controller can do this?


You can define the urls in the csv data format and have Jmeter loop through it.

The csv file can be defined and loaded with the CSV data config.
The variable names stand for each of the columns in the csv file, and can be referred in the loop controllers.

Example:

  1. Define an while controller with the Condition as ${url}
  2. Define an child CSV Data Set Config, with the file path and the variable name url which stands for the column listing the urls.
  3. Use the ${url} with the http request handler to fire the request.
  4. To stop execution after the end of the CSV file is reached: within the CSV Data Set Config set Recycle on EOF? = False and Stop thread on EOF? = True.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号