I am looking for a way to assert the entire response of my API:
The following error has occurred:
I am looking for a way to assert the entire response of my API:
The following error has occurred:
If you make a separate request, to first save the response data to a variable:
let myData = xml2Json(responseBody)
pm.globals.set('myData', JSON.stringify(myData))
You could then try this, in the second request, to check the whole response body against the save variable:
let myResponseData = xml2Json(responseBody)
pm.test('Body is Correct', () => {
pm.expect(myResponseData).to.deep.eql(JSON.parse(pm.globals.get('myData')))
})