[TechCorner Challenge #16] Compare an expected JSON value and actual response in Events
Hello ReadyAPI Сommunity!
We are bringing more awesome tasks your way🙂 Check out the participation rules and the TechCorner Leaderboard here.
In this task, we will have a scenario where you will be comparing an expected JSON value from your Data Source and the actual JSON response. This can be done in a separate Groovy Script test step or in the Script assertion but for this task, we are asking you to do so in the RequestFilter.afterRequest event.
Task: Compare an expected JSON and actual response in the event
In your script, you will be fetching the expected response from your Data Source and your JSON response, and then, parsing the JSON to compare their values.
JSON response example
Expected JSON value (stored in the DataSource test step)