Jmeter发送SOAP请求对WebService接口测试

1.测试计划中添加一个用户自定义变量

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

Jmeter发送SOAP请求对WebService接口测试 随笔 第1张

2.HTTP信息头管理器,添加Content-Tpe,  application/soap+xml;charset=utf-8

Jmeter发送SOAP请求对WebService接口测试 随笔 第2张

3.添加SOAP/XML-RPC Request

URL:http://ws.webxml.com.cn/WebServices/WeatherWS.asmx

 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<getSupportCityString xmlns="http://WebXml.com.cn/">
<theRegionCode>${regionCode}</theRegionCode>
</getSupportCityString>
</soap12:Body>
</soap12:Envelope>

Jmeter发送SOAP请求对WebService接口测试 随笔 第3张

4.添加察看结果树

Jmeter发送SOAP请求对WebService接口测试 随笔 第4张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄