51Testing软件测试论坛
标题:
LR脚本回放的时候数据没能写入数据库,高手帮我看看是怎么回事
[打印本页]
作者:
我是么么茶
时间:
2010-7-26 17:36
标题:
LR脚本回放的时候数据没能写入数据库,高手帮我看看是怎么回事
录制的脚本如下:
vuser_init()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 6
// {JSESSIONID2} = "DCC63A3D326F4211289FBB9F33560862"
// */
web_reg_save_param("JSESSIONID2",
"LB/IC=jsessionid=",
"RB/IC=\"",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
web_url("zkdemo",
"URL=http://127.0.0.1:8080/zkdemo/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=zkau/web/_zv09050418/_zcbzk.ald-0/js/zul/wnd2.js;jsessionid={JSESSIONID2}", ENDITEM,
"Url=zkau/web/_zv09050418/_zcbzk.ald-1/js/zul/box.js;jsessionid={JSESSIONID2}", ENDITEM,
"Url=zkau/web/_zv09050418/_zcbzk.ald-2/js/zul/btn.js;jsessionid={JSESSIONID2}", ENDITEM,
"Url=zkau/web/zk/img/progress2.gif", ENDITEM,
"Url=zkau/web/_zv09050418/_zcbzk.ald-3/js/zul/zul.js;jsessionid={JSESSIONID2}", ENDITEM,
"Url=zkau/web/_zv09050418/_zcbzk.ald-4/js/zul/lang/msgzul*.js;jsessionid={JSESSIONID2}", ENDITEM,
LAST);
lr_start_transaction("login");
lr_think_time(11);
web_submit_data("zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862",
"Action=http://127.0.0.1:8080/zkdemo/zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862?dtid=g5mb&cmd.0=onClick&uuid.0=z_5m_5&data.0=41&data.0=8&data.0=",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:8080/zkdemo/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_url("jdbc.zul;jsessionid=DCC63A3D326F4211289FBB9F33560862",
"URL=http://127.0.0.1:8080/zkdemo/userguide/data/jdbc.zul;jsessionid={JSESSIONID2}",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:8080/zkdemo/",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/zkdemo/zkau/web/zul/img/button/btn-corner.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/button/btn-x.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/tab/tab-corner.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/tab/tab-hm.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/wnd/wnd-corner.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/wnd/wnd-hl.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/wnd/wnd-hr.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/wnd/wnd-hm.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/button/btn-ctr.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/button/btn-y.gif", ENDITEM,
"Url=/zkdemo/zkau/web/zul/img/misc/text-bg.gif", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-6/js/zul/vd.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-4/js/zul/tab2.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-5/js/zul/grid.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-7/js/zul/panel.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-0/js/zul/wnd2.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-3/js/zul/btn.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-8/js/zul/zul.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-1/js/zul/widget.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-2/js/zul/box.js", ENDITEM,
"Url=/zkdemo/zkau/web/_zv09050418/_zcbzk.ald-9/js/zul/lang/msgzul*.js", ENDITEM,
LAST);
web_submit_data("zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862_2",
"Action=http://127.0.0.1:8080/zkdemo/zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862?dtid=g5mb&cmd.0=rmDesktop",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:8080/zkdemo/",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
LAST);
lr_end_transaction("login",LR_AUTO);
return 0;
}
Action()
{
lr_start_transaction("submit");
lr_think_time(46);
web_submit_data("zkau",
"Action=http://127.0.0.1:8080/zkdemo/zkau?dtid=g6mb&cmd.0=onChange&uuid.0=z_6m_31&data.0=jack001%40hotmail.com&data.0=false&data.0=0&cmd.1=onChange&uuid.1=z_6m_01&data.1=jack001&data.1=false&data.1=7&cmd.2=onClick&uuid.2=z_6m_51&data.2=34&data.2=16&data.2=",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:8080/zkdemo/userguide/data/jdbc.zul;jsessionid={JSESSIONID2}",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_url("message.jsp",
"URL=http://127.0.0.1:8080/zkdemo/userguide/data/message.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
web_submit_data("zkau_2",
"Action=http://127.0.0.1:8080/zkdemo/zkau?dtid=g6mb&cmd.0=rmDesktop",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:8080/zkdemo/userguide/data/jdbc.zul;jsessionid={JSESSIONID2}",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
LAST);
lr_end_transaction("submit",LR_AUTO);
return 0;
}
作者:
msnshow
时间:
2010-7-26 21:32
你要看有没有报错了,没有参数化,有可能会出现唯一性约束之类的
作者:
我是么么茶
时间:
2010-7-27 08:58
标题:
回复 2# 的帖子
一直都没报错,我该如何解决这个问题
作者:
云层
时间:
2010-7-27 09:41
eb_submit_data("zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862",
"Action=http://127.0.0.1:8080/zkdemo/zkau;jsessionid=DCC63A3D326F4211289FBB9F33560862?dtid=g5mb&cmd.0=onClick&uuid.0=z_5m_5&data.0=41&data.0=8&data.0=",
这里应该需要关联的
作者:
我是么么茶
时间:
2010-7-29 08:52
谢谢云层,问题解决了
作者:
akui
时间:
2010-8-3 15:03
LZ是怎么解决的呢?
作者:
我是么么茶
时间:
2010-8-5 13:17
标题:
回复 6# 的帖子
对submit函数里面的一些地方做手动关联
作者:
gyl0825
时间:
2011-9-23 10:48
我也遇到这个问题了,不知道该怎么关联
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2