How to Match values in JSON response with JDBC response? just want to check that correct values passing in JSON response and need to verify that those values are matched with JDBC response (fetching data from Database). It is better to Explain with example.
1 Answer
Not knowing the details of JDBC and JSON response it is hard to provide exact configuration, from the high level perspective it should be something like:
- Add JSON Extractor and store "interesting" part(s) of the response into JMeter Variable(s)
- Add JDBC PostProcessor and store values from the DB into JMeter Variable(s). See Debugging JDBC Sampler Results in JMeter guide to learn how to do it
Add Response Assertion (one assertion per variable) to test if variables are equal. Make sure that assertions are placed after the JSON Extractor and JDBC PostProcessor:
-
Appreciate your reply, Could you please provide me JSON Extractor and JDBC PostProcessor more details for this example? specially i want to know about Variable_From_JSON and how it defined in JSON Extractor/HTTP request, .. so on..– lakCommented Feb 10, 2017 at 13:29
-
You are asking for a story while I am limited to one chapter only. If you are not able to figure out the correct JSON/JDBC PostProcessors settings I would recommend starting separate question threads and it will be better to provide response data and highlight what parts you would like to store in JMeter Variables.– Dmitri TCommented Feb 10, 2017 at 15:08
-
I have created separated thread for this Thank you !! sqa.stackexchange.com/questions/25424/…– lakCommented Feb 10, 2017 at 15:29
-
Another thread created for JDBC postProcessor. sqa.stackexchange.com/questions/25427/… . kindly assist this.. thank you !!– lakCommented Feb 10, 2017 at 16:45