51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1685|回复: 1
打印 上一主题 下一主题

[在学] 第一个请求包未录制到,是否手写即可?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-1-24 11:29:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
老师你好,今天我在公司尝试了删除操作,录制完脚本后发现总共4个请求包。脚本需要做优化,我的猜测也不知对不对,还请老师给指点下(1)我个人感觉只需要1、3请求包即可,对吗?(2)第一个请求包未录制到,是否手写即可?
lr_start_transaction("删除");

//1、勾选指定删除数据
//F12抓取到包web_url(),但LR未录取到

//2、点击删除按钮
web_submit_data("validate.action",
"Action=http://192.168.5.78/p2m/task/operation/validate.action",
"Method=POST",
"TargetFrame=",
"RecContentType=text/json",
"Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1",
"Snapshot=t30.inf",
"Mode=HTML",
ITEMDATA,
"Name=taskId", "Value=201812070459350003924a2506c150304584a0dc", ENDITEM,
"Name=operationId", "Value=task/operation/logicDeleteTasks", ENDITEM,
"Name=currentMenuId", "Value=2-1-1-1", ENDITEM,
"Name=UUIDTOKEN", "Value=201901081003050005113816cab9592546c89f7b", ENDITEM,
EXTRARES,
"Url=/p2m/uiframe-2.9.6/images/blue/dialog/win_close.jpg", "Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1", ENDITEM,
"Url=/p2m/uiframe-2.9.6/images/blue/dialog/confirm.png", "Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1", ENDITEM,
LAST);

//3、确认删除弹窗
web_submit_data("logicDeleteTasks.action",
"Action=http://192.168.5.78/p2m/task/operation/logicDeleteTasks.action",
"Method=POST",
"TargetFrame=",
"RecContentType=text/json",
"Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1",
"Snapshot=t31.inf",
"Mode=HTML",
ITEMDATA,
"Name=taskId", "Value=201812070459350003924a2506c150304584a0dc", ENDITEM, //删除id
"Name=operationId", "Value=task/operation/logicDeleteTasks", ENDITEM, //??
"Name=currentMenuId", "Value=2-1-1-1", ENDITEM,
"Name=UUIDTOKEN", "Value=201901081003050005113816cab9592546c89f7b", ENDITEM,
EXTRARES,
"Url=/p2m/uiframe-2.9.6/js/syswareui/plugins/jquery-ui-1.9.2.custom/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png", "Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1", ENDITEM,
"Url=/p2m/uiframe-2.9.6/js/syswareui/plugins/jquery-ui-1.9.2.custom/css/ui-lightness/images/ui-icons_228ef1_256x240.png", "Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1", ENDITEM,
LAST);

//4、删除成功浮层提示
web_submit_data("simpleProjectTreeGridList.action_2",
"Action=http://192.168.5.78/p2m/task/grid/data/simpleProjectTreeGridList.action?_time=1546941317947",
"Method=POST",
"TargetFrame=",
"Referer=http://192.168.5.78/p2m/task/grid/view/simpleProjectTreeGridList.simplemesh?currentMenuId=2-1-1-1",
"Snapshot=t32.inf",
"Mode=HTML",
ITEMDATA,
"Name=limit", "Value=20", ENDITEM,
"Name=start", "Value=0", ENDITEM,
"Name=gridId", "Value=simpleProjectTreeGridList", ENDITEM,
"Name=centerId", "Value=-1", ENDITEM,
"Name=id", "Value=7A74DF5AD96E1CDCE0530100007FFA2C", ENDITEM,
"Name=rootId", "Value=7A74DF5AD96E1CDCE0530100007FFA2C", ENDITEM,
"Name=sort", "Value=", ENDITEM,
"Name=dir", "Value=", ENDITEM,
"Name=UUIDTOKEN", "Value=201901081003050005113816cab9592546c89f7b", ENDITEM,
LAST);

lr_end_transaction("删除",LR_AUTO);

return 0;



在学课程:
手写Loadrunner脚本彻底摆脱录制的痛
http://www.atstudy.com/course/572



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2019-1-24 11:57:26 | 只看该作者
1。删除成功提示的请求,其实可以不需要写了(因为你已经删除成功了,写了只会增大你客户端的压力)

2。我推荐的方法一直是手写脚本啊

如果你的请求录制没录到,你可以跑下脚本,如果数据成功删除(那么那个请求就不是删除必须的)

可以跟开发多沟通,把路径给前端开发(问他们删除接口),他们一看就懂了
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-15 06:01 , Processed in 0.063171 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表