LoadRunner中的事务

发表于:2008-8-02 15:49

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:未知    来源:网络转载

分享:

  事务举例:如下为一个LoadRunner所生成的脚本。

web_url("Folder.jsp_4",

    "URL=http://172.17.16.5/xpc71/jsp/com/folder/Folder.jsp",

    "Resource=0",

    "RecContentType=text/html",

    "Referer=http://172.17.16.5/xpc71/LoginAction.do",

    "Snapshot=t10.inf",

    "Mode=HTML",

    LAST);

 

web_url("TemplateAdminAction.do",

    "URL=http://172.17.16.5/xpc71/TemplateAdminAction.do?forwardID=1",

    "Resource=0",

    "RecContentType=text/html",

    "Referer=http://172.17.16.5/xpc71/LoginAction.do",

    "Snapshot=t11.inf",

    "Mode=HTML",

    LAST);

 

web_submit_form("ScheduleCreationAction.do",

    "Snapshot=t12.inf",

    ITEMDATA,

    "Name=PTName", "Value=test", ENDITEM,

    "Name=headerTempID", "Value=ttte", ENDITEM,

    "Name=selectHeader", "Value=1", ENDITEM,

    "Name=schTempID", "Value=preProductionDetailTemplate", ENDITEM,

    LAST);

  我们插入事务之后如下所示:

lr_start_transaction("事务");

lr_start_transaction("事务1");

lr_start_transaction("事务2");

web_url("Folder.jsp_4",

    "URL=http://172.17.16.5/xpc71/jsp/com/folder/Folder.jsp",

    "Resource=0",

    "RecContentType=text/html",

    "Referer=http://172.17.16.5/xpc71/LoginAction.do",

    "Snapshot=t10.inf",

    "Mode=HTML",

    LAST);

lr_end_transaction("事务", LR_AUTO);

web_url("TemplateAdminAction.do",

    "URL=http://172.17.16.5/xpc71/TemplateAdminAction.do?forwardID=1",

    "Resource=0",

    "RecContentType=text/html",

    "Referer=http://172.17.16.5/xpc71/LoginAction.do",

    "Snapshot=t11.inf",

    "Mode=HTML",

    LAST);

lr_end_transaction("事务1", LR_AUTO);

web_submit_form("ScheduleCreationAction.do",

    "Snapshot=t12.inf",

    ITEMDATA,

    "Name=PTName", "Value=test", ENDITEM,

    "Name=headerTempID", "Value=ttte", ENDITEM,

    "Name=selectHeader", "Value=1", ENDITEM,

    "Name=schTempID", "Value=preProductionDetailTemplate", ENDITEM,

    LAST);

lr_end_transaction("事务2", LR_AUTO);

 

32/3<123>
价值398元的测试课程免费赠送,填问卷领取吧!

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计

法律顾问:上海漕溪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2022
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号