vlatko606
vlatko606

Reputation: 1149

jmeter - Looping based on DB query

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

enter image description here

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

enter image description here

Any help is appreciated

Upvotes: 0

Views: 313

Answers (1)

Dmitri T
Dmitri T

Reputation: 168072

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

enter image description here

This way you will get the following JMeter Variables:

enter image description here

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

Upvotes: 1

Related Questions