问题
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