How to assert xml response

I figured out how I can do it, here is an example

var responseJson1 = xml2Json(pm.response.text());
console.log(responseJson1);
pm.expect(pm.response.text()).to.include("sometext or tagname");
pm.expect(pm.response.text()).to.include(pm.variables.replaceIn('{{somevalue}}'));
1 Like