harshit gupta
harshit gupta

Reputation: 1

Comparison of HTTP response and JDBC response for any request in JMeter

I have API request for which I am getting the response in JSON & for the same data I need to verify /compare it with database as well .

Http request response :-

[ { "name": "TRANSLATOR_MERGE_SIMILAR_STUDIES_ENABLED", "value": "false" } ]

JDBC response

PARAM_VALUE false

NOw I want to assert the "False" from both the responses & make the case passed/failed.

Can anyone suggest something. I have 100 + similar requests for which I have to compare the data with DB vaules.

Upvotes: -1

Views: 30

Answers (1)

Ivan G
Ivan G

Reputation: 2872

  1. Extract value from HTTP response using JSON Extractor configured like this:

    enter image description here

  2. Extract value from the database using JDBC PostProcessor like this:

    enter image description here

  3. Compare the values using Response Assertion like this:

    enter image description here

  4. Enjoy

Upvotes: 0

Related Questions