webserivice協(xié)議腳本開發(fā)
webserivice協(xié)議腳本開發(fā)的兩種方式:
-
- HTTP請(qǐng)求
- 通過(guò)soap模板
- SOAP/XML-RPC Request(jmeter3.2之后已經(jīng)不支持)
SOAP/XML-RPC Request請(qǐng)求
步驟:
1、測(cè)試計(jì)劃
2、添加線程組
3、添加取樣器,SOAP/XML
-RPC Request請(qǐng)求
地址:http://www.webxml.
com.cn/WebServices/WeatherWebService.asmx?
op=getWeatherbyCityNam
URL:WeatherWebService Web 服務(wù)
soap/XML-RPC Data
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
http://WebXml.com.cn/">
深圳
HTTP請(qǐng)求方式開發(fā)webservice接口
網(wǎng)址:
Host: www.webxml.com.cn
get請(qǐng)求:
URL:/WebServices/ChinaZipSearchWebService.asmx/getZipCodeByAddress?theProvinceName=廣東&theCityName=深圳&theAddress=&userID=
post方式:
Host: www.webxml.com.cn
Content-Type: application/x-www-form-urlencoded
URL:/WebServices/ChinaZipSearchWebService.asmx/getZipCodeByAddress
data:
theProvinceName=廣東&theCityName=深圳&theAddress=&userID=
soap模板開發(fā)webservice協(xié)議腳本
分別介紹
用戶自定義變量(user defined variables)
HTTP請(qǐng)求默認(rèn)值(HTTP Request Defaults)
HTTP消息頭管理器(HTTP Header Manager)
HTTP請(qǐng)求
URL:/WebServices/ChinaZipSearchWebService.asmx
data:
<?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> <getZipCodeByAddress xmlns="http://WebXml.com.cn/"> <theProvinceName>廣東</theProvinceName> <theCityName>深圳</theCityName> <theAddress></theAddress> <userID></userID> </getZipCodeByAddress> </soap12:Body> </soap12:Envelope>
沒有接口文檔怎么獲取報(bào)文信息
1、安裝soapui工具,下載地址:SoapUI Latest Releases | SoapUI
2、新建soap 項(xiàng)目文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-831729.html
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-831729.html
到了這里,關(guān)于想提升測(cè)試效率?這個(gè)jmeter開發(fā)webserice協(xié)議的腳本必備!的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!