Soap地址:http://www.webxml.com.cn/webservices/DomesticAirline.asmx?op=getDomesticAirlinesTime
Soap 请求示例
POST /webservices/DomesticAirline.asmx HTTP/1.1
Host: www.webxml.com.cn
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://WebXml.com.cn/getDomesticAirlinesTime"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getDomesticAirlinesTime xmlns="http://WebXml.com.cn/">
<startCity>string</startCity>
<lastCity>string</lastCity>
<theDate>string</theDate>
<userID>string</userID>
</getDomesticAirlinesTime>
</soap:Body>
</soap:Envelope>
一、建立线程组
1.1 添加线程组
测试计划 →添加 → 线程(用户) → 线程组
1.2 添加HTTP信息头管理器
线程组 →添加 → 配置元件 → HTTP信息头管理器
1.3 添加HTTP请求
线程组 →添加 → 取样器 → HTTP请求
1.4 添加查看结果树
线程组 →添加 → 监听器 → 查看结果树
1.5 添加聚合报告
线程组 →添加 → 监听器 → 聚合报告
二、配置线程组
2.1 线程组
名称:Soap测试
线程数:100
Ramp-UP时间:10
循环次数:1
参数具体含义:https://www.lfhacks.com/tech/jmeter-thread-properties#model
2.2 HTTP信息头管理器
Content-Type: text/xml; charset=utf-8
2.3 HTTP请求
根据请求示例填入对应参数
消息体数据
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getDomesticAirlinesTime xmlns="http://WebXml.com.cn/">
<startCity>北京</startCity>
<lastCity>上海</lastCity>
<theDate>2020-9-30</theDate>
<userID></userID>
</getDomesticAirlinesTime>
</soap:Body>
</soap:Envelope>