效能測試十:jmeter進階之webService與socket
阿新 • • 發佈:2018-12-24
一、webService
1、新增http post請求
2、新增header:Conent-type:text/xml
Post請求的body中填寫
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="http://webservice.lee.com/">
<soapenv:Header/>
<soapenv:Body>
<web:getOrderInfo>
<!--Optional:-->
<arg0>aaa</arg0>
<!--Optional:-->
<arg1>123</arg1>
</web:getOrderInfo>
</soapenv:Body>
</soapenv:Envelope>
其中,紅色字型是需要根據不同的webservice介面進行修改,其他保持固定
xmlns:web=“http://webservice.lee.com/”是包名
web:getOrderInfoById是方法名
arg為引數
4.x以下新增
4.x以上新增
webService都是post請求
header:Conent-type:text/xml
二、socket
伺服器名稱或IP:填寫socket介面的ip
埠號:寫socket介面的埠號
Re-use connection:是否重用連結,如果選擇,同一個執行緒執行的所有請求都會使用一個tcp連線
Re-use connection+close connection:每個請求結束後關閉連線
End of line byte value:socket介面返回的資料結尾識別符號的ascii碼 要傳送的文字:傳送的資料