Jmeter介面測試webservice

來源:互聯網
上載者:User

標籤: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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.