soap interface test

1. preparatory steps:

  1.1    installation soapui, open the software, click on the top of the "SOAP" create a new file, in the "initial WSDL" input original WSDL address ( ie the address of the interface to be tested ), click "OK"

The Original Address: the Initial WSDL input original WSDL Address: http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl  

 

   1.2    Select the test interface: select the new file, find the interface to be tested, click Request request, the request to copy the contents of the paste left behind need to use

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>?</web:theAreaID>

6       </web:getTVstationString>

7    </soapenv:Body>

8 </soapenv:Envelope>

 

 2.  jmeter的操作 添加SOAP/XML-RPC Request(在jmeter3.2以后版本中已经取消了这个取样器3.2之前版本都有)

  2.1  新建线程组点击“测试计划”右键“添加”—“Threads(Users)”—“线程组”

 

  2.2  添加SOAP/XML-PRC Request sampler 点击“线程组”右键“添加”——“Sampler”——“SOAP/XML-PRC Request”

 

 

2.3   ①Url上填写需要接口地址,去掉?及其后面的数据

如:http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl  ,url上填写为:http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx

 

    ②send soapaction需要填写的地址为之前soapui得到的内容:为第1行数据和第4行接口的相叠加的内容

       1   web="http://WebXml.com.cn/"  

       4  <web:getTVstationString>

  Send soapaction形成地址http://WebXml.com.cn/getTVstationString

  对于公共的webservice接口,可以使用soapUI进行抓取,或者是其他工具去抓取发送报文的格式

③SOAP/XML-PRC Data 内填写上之前用Soapui的请求内容,在body里面填写需要的参数(json格式的参数)

 

 2.4   点击“线程组”,右键---“添加”-----“配置元件”—HTTP信息头管理器        

再点击信息管理器底部的“添加”按钮,填写上内容:  Content-Type: application/soap+xml;charset=UTF-8;     

 2.5   点击“线程组”,右键---“添加”----“监听器”----“察看结果树”和“聚合报告”

https://www.cnblogs.com/stone9159/p/8078842.html  参考链接:

 

 

2.6  聚合报告如下图所示,每一列的含义分别表示请求名称,

   请求总数,请求的平均响应时间(毫秒),50%的请求的响应时间,90%的请求的响应时间,95%的请求的响应时间,

   99%的请求的响应时间,最小的响应时间,最大的响应时间,错误的请求率(错误请求数/总的请求数),吞吐量(每秒

    处理的请求数),接收的字节速率,发送的字节速率。

Guess you like

Origin www.cnblogs.com/snow-black/p/12083470.html