0
点赞
收藏
分享

微信扫一扫

wireshark配合jmeter测试webservice接口


1.首先,获取本地和接口的ip,以便设置过滤

wireshark配合jmeter测试webservice接口_性能测试

wireshark配合jmeter测试webservice接口_xml_02

2.wireshark设置过滤

ip.dst==192.168.0.101 and ip.src==61.147.124.120 and http 

wireshark配合jmeter测试webservice接口_xml_03

3.执行py文件并捕获请求

wireshark配合jmeter测试webservice接口_xml_04

wireshark配合jmeter测试webservice接口_xml_05

 捕捉到的soap请求

wireshark配合jmeter测试webservice接口_性能测试_06

复制soap请求

wireshark配合jmeter测试webservice接口_xml_07

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<getMobileCodeInfoResponse xmlns="http://WebXml.com.cn/">

<getMobileCodeInfoResult>13888888888</getMobileCodeInfoResult>

</getMobileCodeInfoResponse>

</soap:Body>

</soap:Envelope>


wireshark配合jmeter测试webservice接口_xml_08

另外,也可通过firbug查看ip

wireshark配合jmeter测试webservice接口_javascript_09

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:operation soapAction="http://WebXml.com.cn/getMobileCodeInfo" style="document"/>

<soap:Body>

<getMobileCodeInfoResponse xmlns="http://WebXml.com.cn/">

<getMobileCodeInfoResult>13888888888</getMobileCodeInfoResult>

</getMobileCodeInfoResponse>

</soap:Body>

</soap:Envelope>

 wireshark配合jmeter测试webservice接口_性能测试_10

4.jmeter中添加http信息头、soap请求、断言、查看结果树

wireshark配合jmeter测试webservice接口_性能测试_11



声明:如有侵权,请联系删除。

============================= 升职加薪 ==========================


举报

相关推荐

0 条评论