• Loadrunner 脚本开发-soap_request函数介绍及WebService接口测试


    脚本开发- soap_request函数介绍及WebService接口测试

    by:授客 QQ1033553122

    函数介绍

    soap_request

    函数执行一个SOAP请求

    函数原型

    int soap_request( const char *StepName, ExpectedResponse, URL, , [Attachments,] LAST);

     

    参数说明:

    StepName 函数名称

     

    ExpectedResponse:可接受的响应类型

    1ExpectedResponse=SoapResult 接受SOAP输出响应,且出现SOAP错误响应则标记失败(Accept SOAP output responses and fail on SOAP faults)

    2ExpectedResponse=SoapFault 接受SOPA错误响应,且SOAP正常输出响应则标记失败(Accept SOAP faults and fail on SOAP output responses)

    3ExpectedResponse=AnySoap 接受SOAP输出和SOAP错误响应(Accept both SOAP output and SOAP fault responses.)

     

    URL: WebService需要加载的url地址

     

    XMLEnvelope

    用于必备元素列表,使用以下字符串格式:

    "Element=value"

    SOAPEnvelope: 发送给服务器是XML数据包

    Snapshot: 包含函数快照的.inf文件名

    ResponseParam:  存储服务器响应的输出参数。

     

    Attachments 需要发送、接收的附件(可选参数) 详情查阅官方文档 Attachment Specifications

     

    LAST 表名Specifications  list结束的标记

     

    Web Service接口测试

    协议选择




    脚本


     

    运行结果:

    Loadrunner <wbr>脚本开发-soap_request函数介绍及WebService接口测试

     

    对比SoapUI测试结果



     

  • 相关阅读:
    常见设计模型
    Python多版本编译安装&修改Python默认启动版本
    环境变量
    关于Bash命令的一些理解
    Sublime安装激活
    Python虚拟环境搭建
    Deepin Bug记录
    Deepin的使用感受
    代码实现Win+Key
    link
  • 原文地址:https://www.cnblogs.com/shouke/p/10157788.html
Copyright © 2020-2023  润新知