• loadrunner常用web动作函数


    web_custom_request  ---允许使用任何http请求方法

    脚本一:

    web_custom_request("baidu_request",
    "URL=https://www.baidu.com",
    "Method=GET",
    "TargetFrame=",
    "Resource=0",
    "Referer=",
    "Body=",
    LAST);

    web_submit_data  ---执行无条件或无上下文表单提交

    脚本二:

    web_submit_data("reservations.pl",
    "Action=http://127.0.0.1:1080/cgi-bin/reservations.pl",
    "Method=POST",
    "TargetFrame=",
    "RecContentType=text/html",
    "Referer=http://127.0.0.1:1080/cgi-bin/reservations.pl?page=welcome",
    "Snapshot=t4.inf",
    "Mode=HTML",
    ITEMDATA,
    "Name=advanceDiscount", "Value=0", ENDITEM,
    "Name=depart", "Value=Frankfurt", ENDITEM,
    "Name=departDate", "Value=11/04/2019", ENDITEM,
    "Name=arrive", "Value=Los Angeles", ENDITEM,
    "Name=returnDate", "Value=11/05/2019", ENDITEM,
    "Name=numPassengers", "Value=1", ENDITEM,
    "Name=seatPref", "Value=Aisle", ENDITEM,
    "Name=seatType", "Value=Business", ENDITEM,
    "Name=findFlights.x", "Value=42", ENDITEM,
    "Name=findFlights.y", "Value=5", ENDITEM,
    "Name=.cgifields", "Value=roundtrip", ENDITEM,
    "Name=.cgifields", "Value=seatType", ENDITEM,
    "Name=.cgifields", "Value=seatPref", ENDITEM,
    LAST);

    web_submit_form  ---模拟表单提交

     web_submit_form录制时会判断浏览器中是否有cache的内容,如果有web_submit_form函数中只保存和缓存不相同的数据;

     web_submit_data()录制时无需判断浏览器是否有cache,把所有录制的数据都保存在web_submit_data()函数中,例如userSession,SessionId,token等

    web_url  ---get请求url

    脚本三:

    web_url("index.htm",
    "URL=http://127.0.0.1:1080/WebTours/index.htm",
    "TargetFrame=",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=",
    "Snapshot=t1.inf",
    "Mode=HTML",
    LAST);

  • 相关阅读:
    python标准库学习-SimpleHTTPServer
    迁移cnblog博客
    zabbix监控使用
    20 个 OpenSSH 最佳安全实践
    编写基本的 udev 规则
    Linux.Siggen.180
    在 CentOS 7.0 上安装配置 Ceph 存储
    常用 GDB 命令中文速览
    Kubernetes TLS认证
    音乐下载api
  • 原文地址:https://www.cnblogs.com/youyouyunduo/p/11829097.html
Copyright © 2020-2023  润新知