vpnkumar
5 years agoOccasional Contributor
Compare Json Response from the data source with the actual response in event
In my correct setup I have scenarios where I need to compare the JSON response from the data source to actual response, this can be done in a separate groovy but because of implementation structure w...
- 5 years ago
I see that the Support Team provided several suggestions on for this case, let me copy it here so that anyone experiencing the same thing could have this reply as a reference:
>>
1. You can use property expansions in events, for example:
def value = context.expand( '${DataSource#ExpectedResponse}' )
2. You can use a script assertion to compare JSON values instead of events: https://support.smartbear.com/readyapi/docs/testing/assertions/reference/script.html
Also, this article might be helpful for you: https://smartbear-cc.force.com/portal/KbArticleViewer?name=How-Do-I-Compare-Two-Dynamic-JSON-Responses&sp=all<<
- 5 years ago
Thanks this solved my problem