1

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.

  • Data validation type tests don't sound like they should be in JMeter? – ernie Feb 9 '17 at 21:59
  • is it possible in Jmeter? any comments others? – lak Feb 10 '17 at 7:45
2

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:

  1. Add JSON Extractor and store "interesting" part(s) of the response into JMeter Variable(s)
  2. 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
  3. 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:

    Response Assertion JSON JDBC

  • 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.. – lak Feb 10 '17 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 T Feb 10 '17 at 15:08
  • I have created separated thread for this Thank you !! sqa.stackexchange.com/questions/25424/… – lak Feb 10 '17 at 15:29
  • Another thread created for JDBC postProcessor. sqa.stackexchange.com/questions/25427/… . kindly assist this.. thank you !! – lak Feb 10 '17 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.