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 we want to compare it in RequestFilter.afterRequest even.
The problem we are running into is in event we are not able to fetch expected response from datasource, can someone please have a look into this and suggest how this can be achived.
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<<
Thanks this solved my problem