In Jmeter, i need to send the JDBC Response from one thread group to another thread group Request URL, but without JDBC i can able to send the response from one thread to another thread,but if use the JDBC then 2nd Thread is failed. could you please help me to resolve this.
2 Answers
It is not possible to provide comprehensive answer without seeing
- your Test Plan snapshot (Tools -> Generate Schematic View)
- what you are trying to send
- how you're going to use it in 2nd Thread Group
- jmeter.log file
Normally when you specify "Variable Names" and/or "Result Variable Name" in the JDBC Request sampler
it generates some JMeter Variables which can be observed using Debug Sampler and View Results Tree listener combination
for example:
given this database structure:
and the following JDBC Request sampler results:
if you define JDBC Results Variables like:
you will get the following variables created:
Once you see the JMeter Variable(s) you want to transfer to another Thread Group in the Debug Sampler it shouldn't be a problem to perform the transition using __setProperty() function or Inter-Thread Communication Plugin
Set up your plan as below. Add Loop Controller--> Inside Loop Controller set your JDBC Connection Configuration and Request. -->Add Counter(available in Config Element) and all other Request. -->If you want to iterate it multiple time set your Loop Controller say 5 And make sure to keep you Counter with this setting [starting value=1;Increment=1;Maximum Value:1], It works for me.