I have a test in postman and the response comes back with 'nested' data. By that I mean we have a 'data' section of the response and a 'messages' section. Inside data there are a ton of other fields and those are the ones I need to be verifying on with Jetpacks. How can I get to these fields?
this is what the json response looks like: { "Data": { "QRCode_ID": 168, "Repairer_ID": null, "AssignedToEmployee_ID": null, "TaskName": "003021919913", "DueDate": "2015-07-02T00:12:53.597", "DueDateTimeSpan": 1959471956224, "TaskStatus_ID": 1, "Description": "due 6/30, 5:00", "TaskUrgency_ID": null, "TaskType_ID": null, "DueDateDisplay": "2015-07-02 00:12",....... } }, "Messages": [ "success" ] }
And this is what my postman test looks like: var data = JSON.parse(responseBody); tests["Verify QRCode_ID is correct"] = data.QRCode_ID === 168;
Aucun commentaire:
Enregistrer un commentaire