jmeter - Looping based on DB query

不问归期 提交于 2021-01-29 20:14:02

问题


I need to tell my loop counter to loop x Times, based on the DB query.

My scenario is as follows

Execute the query
Count the lines
based on dynamic response from JDBC request, i need to place my looping logic

Any help is appreciated


回答1:


Just define a JMeter Variable in the "Variable Names" field of the JDBC Request, i.e. put url there:

This way you will get the following JMeter Variables:

So you will be able to use ${url_#} as the reference to the number of the matching rows in the Loop Controller.

More information: Debugging JDBC Sampler Results in JMeter

P.S. It might be easier to use ForEach Controller



来源:https://stackoverflow.com/questions/61998179/jmeter-looping-based-on-db-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!