性能测试十:jmeter进阶之webService与socket

 一、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

扫描二维码关注公众号,回复: 4635749 查看本文章

二、socket

服务器名称或IP:填写socket接口的ip

端口号:写socket接口的端口号

Re-use connection:是否重用链接,如果选择,同一个线程执行的所有请求都会使用一个tcp连接

Re-use connection+close connection:每个请求结束后关闭连接

End of line byte value:socket接口返回的数据结尾标识符的ascii码 要发送的文本:发送的数据

 

 

猜你喜欢

转载自www.cnblogs.com/zhongyehai/p/10171050.html