我使用 postman,如何从 SOAP API 响应中获取特定的字符串?

问题描述 投票:0回答:0

这里是邮递员控制台报告,我怎么断言版本号?

我使用这个代码:

pm.test("Check VERSION ", function() {
            var jsonObject = xml2Json(responseBody);
            console.log(jsonObject['SOAP-ENV:Envelope']['SOAP-ENV:Body']['verovaluate2Response']);
            pm.expect(jsonObject['SOAP-ENV:Envelope']['SOAP-ENV:Body']['verovaluate2Response']['VERSION']).to.eql("vrvlt 10.5.24.13")
}

Please see screenshot here

我需要检查/匹配版本号

xml soap xml-parsing postman
© www.soinside.com 2019 - 2024. All rights reserved.