51Testing软件测试论坛
标题:
loadrunner录制ZK成功,回放时不显示页面
[打印本页]
作者:
kongweigang2008
时间:
2011-1-8 14:23
标题:
loadrunner录制ZK成功,回放时不显示页面
如题,我用自动关联录制ZK写项目录制部分脚本如下:
跟ajax录制的脚本大同小异,web_url("zk.wcs;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267", 不知道这个里面的jsessionid干什么用的。
Action()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 8
// {JSESSIONID2} = "2DF691D60A8521F8ABF4CB15BCDDA267"
// */
web_reg_save_param("JSESSIONID2",
"LB/IC=jsessionid=",
"RB/IC=\"",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
web_url("index.zul",
"URL=http://localhost:8888/newsips/term/index.zul",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("zk.wcs;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
//这个jseesionid 不知道是写死的,我用{JSESSIONID2} 代替也没成功 不知道这个jsessionid是什么干什么用的,也做过参数化,没有成功。
"URL=http://localhost:8888/newsips/zkau/web/d1e98f25/zul/css/zk.wcs;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/css",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t2.inf",
LAST);
web_url("zk.wpd;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"URL=http://localhost:8888/newsips/zkau/web/d1e98f25/js/zk.wpd;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t3.inf",
LAST);
web_url("zul.lang.wpd;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"URL=http://localhost:8888/newsips/zkau/web/d1e98f25/js/zul.lang.wpd;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t4.inf",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("zul.wnd.wpd;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"URL=http://localhost:8888/newsips/zkau/web/_zv2010090312/js/zul.wnd.wpd;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t5.inf",
LAST);
web_url("zul.inp.wpd;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"URL=http://localhost:8888/newsips/zkau/web/_zv2010090312/js/zul.inp.wpd;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t6.inf",
LAST);
web_url("zhtml.wpd;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"URL=http://localhost:8888/newsips/zkau/web/_zv2010090312/js/zhtml.wpd;jsessionid={JSESSIONID2}",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t7.inf",
LAST);
。。。。。。
lr_think_time(61);
//下边是登陆时候的脚本
web_submit_data("zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267",
"Action=http://localhost:8888/newsips/zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267?dtid=zd_v801&cmd_0=onChange&uuid_0=z_v80_q&data_0=%7B%22value%22%3A%22kxg%22%2C%22start%22%3A3%7D&cmd_1=onOK&uuid_1=z_v80_3&data_1=%7B%22reference%22%3A%22z_v80_q%22%2C%22keyCode%22%3A13%2C%22which%22%3A13%7D",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t16.inf",
"Mode=HTTP",
ITEMDATA,
LAST);
web_submit_data("zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267_2",
"Action=http://localhost:8888/newsips/zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267?dtid=zd_v801&cmd_0=onOK&uuid_0=z_v80_3&data_0=%7B%22reference%22%3A%22z_v80_q%22%2C%22keyCode%22%3A13%2C%22which%22%3A13%7D&cmd_1=onOK&uuid_1=z_v80_3&data_1=%7B%22reference%22%3A%22z_v80_q%22%2C%22keyCode%22%3A13%2C%22which%22%3A13%7D",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t17.inf",
"Mode=HTTP",
ITEMDATA,
LAST);
lr_think_time(4);
web_submit_data("zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267_3",
"Action=http://localhost:8888/newsips/zkau;jsessionid=2DF691D60A8521F8ABF4CB15BCDDA267?dtid=zd_v801&cmd_0=onClick&uuid_0=z_v80_v&data_0=%7B%22pageX%22%3A534%2C%22pageY%22%3A423%2C%22which%22%3A1%2C%22x%22%3A15%2C%22y%22%3A6%7D",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://localhost:8888/newsips/term/index.zul",
"Snapshot=t18.inf",
"Mode=HTTP",
ITEMDATA,
LAST);
}
回放时不成功,困扰我好几天了,网上也是各种搜索,不知道那位大侠对ZK项目做过压力测试,希望能得到您帮助,小弟不胜感激,在线等候您的回复。。。
作者:
云层
时间:
2011-1-8 19:13
JSESSIONID2 肯定是要关联的,你开一个网站或者给我一个部署环境我才能帮你试试
作者:
kongweigang2008
时间:
2011-1-9 11:06
回复
2#
云层
云层老师,感谢您对我问题的关注,我邮箱
kongweigang2008@163.com
,QQ号414347352 ,能给我一个您的联系方式么?以便我把部署环境给您。我用的公司的域,不知道外网能不能访问我tomcat上面部署的项目
http://172.168.1.105:8888/newsips/term/index.zul
作者:
ynntg
时间:
2011-1-9 12:09
录制完成后再关联一下。一般sessionid可以自动关联上的。
不行你就只能手动关联了。
作者:
PrefTest
时间:
2011-1-10 09:50
就是关联问题
作者:
婴儿
时间:
2011-1-10 13:53
多半是边界错了
作者:
kongweigang2008
时间:
2011-1-10 16:58
我录制了登陆模块,回放时,数据库字段已经由logout改变成login了,写了输出语句,控制台也都输出了,就是没捕获到页面。这样算不算成功?能不能用这样的脚本继续后续工作?
作者:
婴儿
时间:
2011-1-11 15:21
写个文本检查就不用到数据库去检查了
作者:
yangemil
时间:
2011-1-11 16:30
自动关联偶尔会出现 关联不完整,我用LR11遇到过!
作者:
andyfly_001
时间:
2011-1-12 23:08
顶一个。。
作者:
yours-123
时间:
2011-1-19 16:11
回访时不显示页面,情况很多。不一定是关联的问题。
有可能是IE和LR版本的问题
还有可能是录制协议选择HTML或URL模式的问题
还有就是不是所有页面回访都会页面显示
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2