jmeter壓測學習-發soap請求測試webservice
阿新 • • 發佈:2021-07-17
前言
jmeter3 的版本可以新建一個SOAP/XML-RPC Request 的請求,直接測試webservice的介面。
jmeter5.1.1 版本已經去掉了自帶的SOAP/XML-RPC Request,需在外掛管理安裝 Custom SOAP Sampler 外掛
Custom SOAP Sampler 外掛
選項-Plugins Manager - Available Plugins - 搜尋 soap 勾選 Custom SOAP Sampler 外掛安裝
webservice介面
通過瀏覽器訪問也可以看到對應的方法和請求引數http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx
測試 getDatabaseInfo 介面不用帶引數
呼叫後返回
jmeter 發SOAP 1.1
先看 SOAP 1.1的版本請求示例
SOAP 1.1的版本需在頭部宣告Content-Type: text/xml; charset=utf-8
和SOAPAction
這2個引數.SOAPAction
對應的值,可以在介面文件上檢視到SOAPAction: "http://WebXml.com.cn/getDatabaseInfo"
jmeter上新增-取樣器-Custom SOAP Sampler