comparison of two json response bodies using gatling

8 views
Skip to first unread message

Vinay Kumar

unread,
Sep 6, 2021, 10:37:58 AM9/6/21
to Gatling User Group
Hi Team,
I am having two API requests and compare their response bodies ( returns in json) and print the difference if there is any difference identified along failing the request through gatling script.

.exec(http("DR_Request1")
  .get("API URL1")
 . check(bodyString.saveAs("DR_Req1_ResponseBody")))
.exec(http("Prod_Request1")
  .get("API URL2")
  .check(bodyString.saveAs("Prod_Req1_ResponseBody")))
Please suggest how to get the difference of two response bodies and how to fail the requests if there is any  difference identified.
I am using gatling 3.5.1 and maven plugin of version 3.1.1
  
   
  

Reply all
Reply to author
Forward
0 new messages