I want to compare 2 JDBC responses in Jmeter:

I have Source reponse from 1 JDBC request as below in table format:

(Source DB)JDBC Response response1:

srcid1 | srcid2 | srcid3| srcid4 |

10 | 20 | 30 | GBP |

11 | 22 | 31 | USD |

(Target DB)JDBC Reponse 2:

tgtid1 | tgtid2 | tgtid3 | tgtid4 |

10 | 20 | 30 | GBP |

11 | 22 | 31 | INR |

I am saving the response as String in JDBC Request (in Result Variable Name)

Now how do I compare the values in each column and Print Pass when values match. Fail it when the values do not match.

Number of rows can change.

Need help with assertion code or any other way this can be achieved in Jmeter.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


It sounds like you’re pulling values from a database and want to perform an operation on them with jmeter. I may be misunderstanding, so please correct me if you see that I am. I see jmeter as a load testing application, rather than something that would be ideal for performing operations on database queries.

I believe that the tool you require to compare these values would be something custom coded. I, for example, would probably do it in Python or a bash script because those are my specialties.