標籤:ini ogr 3.2 http strong body 取消 使用 span
可以用jmeter兩種sampler進行webservice的測試
webservice公用介面的發送報文格式的擷取:(以SoapUI為例)
1、建立一個SOAP Project,在initial WSDL輸入原始的WSDL地址:http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl
2、選擇需要測試的介面
3、找到測試的地址和發送的報文的格式
一、SOAP/XML-RPC Request(在jmeter3.2以後版本中已經取消了這個取樣器)
1、建立線程組、SOAP/XML-PRC Request sampler 、響應斷言、察看結果樹
1 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://WebXml.com.cn/">2 <soapenv:Header/>3 <soapenv:Body>4 <web:getTVstationString>5 <web:theAreaID>12</web:theAreaID>6 </web:getTVstationString>7 </soapenv:Body>8 </soapenv:Envelope>
soapaction的地址:為第1行資料和第4行介面的相疊加的內容
1 web="http://WebXml.com.cn/"
4 <web:getTVstationString>
形成地址:http://WebXml.com.cn/getTVstationString
對於公用的webservice介面,可以使用soapUI進行抓取,或者是其他工具去抓取發送報文的格式
2、在響應斷言中進行斷言,是否響應內容是需要的內容,如下
3、察看結果樹
二、SOAP/XML-RPC Request(在jmeter3.2以後版本中已經取消了這個取樣器)
Jmeter介面測試webservice