POSTMAN SOAP Test Cherio Script

Опубликовано: 14 Июнь 2026
на канале: Rabi Sankar Podder
362
3

//JSON Value check
pm.test("Using XML 2 JSON- Rabi", function () {
var jsonObject = xml2Json(responseBody); //XML to JSON
//Attribute present in the Response Body
pm.expect(jsonObject['soap:Envelope']['soap:Body']['AddResponse']['AddResult']).to.eql('77');
});

// Cheerio -JSON Value check
pm.test("Using cherio- Rabi", function () {
const $= cheerio.load(responseBody)
pm.expect($('AddResult').text()).to.eql('77');
pm.expect($('AddResponse').attr('xmlns')).to.eql('http://tempuri.org/');
});