LR中的事务问题
今天想试试事务的设置,可是设置了开始和技术,为什么会显示说“Failed to end Transaction "end_transaction" (by name). Please check that you made a call to start transaction operation.”最后还来了这样一句"Vuser started transaction "start_transaction", but did not reached a corresponding end transaction statement. The transaction ended automatically with status 'fail'."这是什么原因?请各位大侠帮帮忙,帮帮小弟! 我试了好多都是这个原因! 我是在录制脚本的过程中加入的事务! 脚本贴出来看看感觉应该是结束的时候名字写的不对吧建议不要在录制过程中加事务加注释然后根据注释在录制好的脚本中加事务 Action(){
web_url("ztdy_index.action",
"URL=http://10.22.22.28:8080/irdp/ztdyzs/ztdy_index.action",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.22.22.28:8080/irdp/common/index.action",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=../style/standard/images/xk_list_linebg.gif", ENDITEM,
"Url=../style/standard/images/szcb_btn.gif", ENDITEM,
"Url=../style/standard/images/xk_list_icon.gif", ENDITEM,
"Url=../style/standard/images/kp_right_top2.gif", ENDITEM,
"Url=../style/standard/images/szcb_dqwz_icon.gif", ENDITEM,
"Url=../style/standard/images/a_ztdysq.gif", ENDITEM,
"Url=../style/standard/images/a_ckqbzt.png", ENDITEM,
"Url=../style/standard/images/xs_list02_linebg.gif", ENDITEM,
"Url=../style/standard/images/dy_icon.gif", ENDITEM,
LAST);
web_link("鎴戣\xA6\x81璁\xA2\xE9槄",
"Text=鎴戣\xA6\x81璁\xA2\xE9槄",
"Ordinal=1",
"Snapshot=t5.inf",
EXTRARES,
"Url=/irdp/js/datepicker/skin/WdatePicker.css", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/title_ztdyfw.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/btn_ztdyfw_xz.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/btn_wlcbfw.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/btn_xskdfw.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/btn_sjtsdzfw.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/btn_axcbfw.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
"Url=/irdp/style/standard/images/szcb_btn_bg.gif", "Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92", ENDITEM,
LAST);
web_url("My97DatePicker.htm",
"URL=http://10.22.22.28:8080/irdp/js/datepicker/My97DatePicker.htm",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=lang/zh-cn.js", ENDITEM,
"Url=skin/default/datepicker.css", ENDITEM,
"Url=skin/whyGreen/datepicker.css", ENDITEM,
"Url=skin/default/img.gif", ENDITEM,
LAST);
lr_think_time(12);
lr_rendezvous("jhd");
lr_start_transaction("start_transaction");
web_submit_data("isLogin.action",
"Action=http://10.22.22.28:8080/irdp/ztdyzs/isLogin.action",
"Method=POST",
"Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("ztdyApplyConfirmForExist.action",
"Action=http://10.22.22.28:8080/irdp/ztdyzs/ztdyApplyConfirmForExist.action",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.22.22.28:8080/irdp/jspui/ztdy/ztdyfwsq2.jsp?subjectset_id=92",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=myspace", "Value=true", ENDITEM,
"Name=emailAddr", "Value=null", ENDITEM,
"Name=phoneNum", "Value=13777804250", ENDITEM,
"Name=time_start", "Value=2009-08-10", ENDITEM,
"Name=time_end", "Value=2009-08-12", ENDITEM,
"Name=subjectset_id", "Value=92", ENDITEM,
LAST);
web_submit_data("saveApplyForExist.action",
"Action=http://10.22.22.28:8080/irdp/ztdyzs/saveApplyForExist.action?myspace=true&emailAddr=null&phoneNum=13777804250&time_start=2009-08-10&time_end=2009-08-12&subjectset_id=92",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.22.22.28:8080/irdp/ztdyzs/ztdyApplyConfirmForExist.action",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
LAST);
lr_end_transaction("end_transaction", LR_AUTO);
return 0;
} 是不是事务设置的地方错了? lr_start_transaction("start_transaction");
lr_end_transaction("end_transaction", LR_AUTO);
你start和end中使用的是2个不同的事务名,所以start会缺少一个end,而end又会缺少一个start,所以你的脚本在运行时报错2次。应该修改成:
lr_start_transaction("事务名");
lr_end_transaction("事务名", LR_AUTO); 哦!两个事务名要一样的,对应起来。谢谢! 事务的开始与结束名要对应起来:lol 新手,学习中,, :L :o :D 我也犯了这种低级错误~~ 回复 7# zzy7999
非常感谢,我也遇到了这个问题, 看到此贴后,问题解决了,谢谢!
页:
[1]