|
本帖最后由 lipeijun 于 2011-4-7 13:57 编辑
请问“脚本录制回放没报错,但数据没有插入” 可能是什么问题?
请哪位高手解答一下,多谢!
用的是loadrunner 9 和IE6 采用web(HTTP/HTML)协议,http base和URL base形式都用过了,问题一样。
Action()
{
web_add_header("Accept",
"*/*");
web_add_auto_header("Accept-Encoding",
"gzip, deflate");
web_add_auto_header("Accept-Language",
"zh-cn");
web_add_auto_header("User-Agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2)");
web_url("login.do",
"URL=http://192.168.0.22/fqcl/login.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login/login_02.gif", ENDITEM,
"Url=images/login/login_03.gif", ENDITEM,
"Url=images/login/login_01.gif", ENDITEM,
"Url=images/login/login_06.gif", ENDITEM,
"Url=images/login/loginbtm.gif", ENDITEM,
"Url=images/login/login_05.gif", ENDITEM,
"Url=images/VerificationCode.jpg", ENDITEM,
"Url=images/login/login_04.gif", ENDITEM,
LAST);
web_add_auto_header("Accept",
"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*");
web_add_header("Cache-Control",
"no-cache");
web_submit_data("login.do;jsessionid=56F9EFD08835A3A318C3B1A2630F412C",
"Action=http://192.168.0.22/fqcl/login.do;jsessionid=56F9EFD08835A3A318C3B1A2630F412C",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.22/fqcl/login.do",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=method", "Value=login", ENDITEM,
"Name=user_name", "Value=user100", ENDITEM,
"Name=button", "Value= ", ENDITEM,
"Name=pass_word", "Value=0", ENDITEM,
"Name=verificationCode", "Value=", ENDITEM,
EXTRARES,
"Url=styles/images/blue/column_ddimg.gif", "Referer=http://192.168.0.22/fqcl/entp/Frames.do?method=index", ENDITEM,
"Url=styles/images/blue/menu_bg.gif", "Referer=http://192.168.0.22/fqcl/entp/Frames.do?method=index", ENDITEM,
"Url=styles/images/blue/column_bg.gif", "Referer=http://192.168.0.22/fqcl/entp/Frames.do?method=index", ENDITEM,
"Url=styles/images/blue/subtitle_bg.gif", "Referer=http://192.168.0.22/fqcl/entp/Frames.do?method=index", ENDITEM,
"Url=styles/images/blue/subtitle_img.gif", "Referer=http://192.168.0.22/fqcl/entp/Frames.do?method=index", ENDITEM,
LAST);
web_link("·ÏÆú²úÆ·³ö¿â/Èë¿â±í",
"Text=·ÏÆú²úÆ·³ö¿â/Èë¿â±í",
"Snapshot=t3.inf",
EXTRARES,
"Url=../styles/images/blue/btn_bg.jpg", ENDITEM,
LAST);
web_url("PdDiscrepancy.do",
"URL=http://192.168.0.22/fqcl/entp/PdDiscrepancy.do?method=add",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_add_auto_header("Accept",
"*/*");
web_add_auto_header("Cache-Control",
"no-cache");
web_add_header("x-requested-with",
"XMLHttpRequest");
lr_think_time(8);
web_submit_data("PdDiscrepancy.do_2",
"Action=http://192.168.0.22/fqcl/entp/PdDiscrepancy.do",
"Method=POST",
"RecContentType=text/x-json",
"Referer=http://192.168.0.22/fqcl/entp/PdDiscrepancy.do?method=add",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=method", "Value=checkDailyDate", ENDITEM,
"Name=dailyDate", "Value=2011-04-07", ENDITEM,
LAST);
web_add_auto_header("Accept",
"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*");
web_submit_data("PdDiscrepancy.do_3",
"Action=http://192.168.0.22/fqcl/entp/PdDiscrepancy.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.22/fqcl/entp/PdDiscrepancy.do?method=add",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=org.apache.struts.taglib.html.TOKEN", "Value=e2f7631234c1fded3011ef1b304a2212", ENDITEM,
"Name=method", "Value=save", ENDITEM,
"Name=id", "Value=", ENDITEM,
"Name=entpId", "Value=100", ENDITEM,
"Name=entpName", "Value=²âÊÔÓÃÀýÆóÒµÃû³Æ100", ENDITEM,
"Name=PIndex", "Value=120115", ENDITEM,
"Name=infoState", "Value=0", ENDITEM,
"Name=sysDate", "Value=", ENDITEM,
"Name=dailyDate", "Value=2011-04-07", ENDITEM,
"Name=code", "Value=123321", ENDITEM,
"Name=pdType1", "Value=10", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=0", ENDITEM,
"Name=pdType1", "Value=", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=0", ENDITEM,
"Name=pdType2", "Value=", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=0", ENDITEM,
"Name=pdType3", "Value=", ENDITEM,
"Name=pdType4", "Value=40", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=10", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=0", ENDITEM,
"Name=pdType4", "Value=", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=0", ENDITEM,
"Name=pdType5", "Value=", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=2.30", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=0", ENDITEM,
"Name=pdType6", "Value=", ENDITEM,
"Name=rpPerson", "Value=aa", ENDITEM,
"Name=auditor", "Value=bb", ENDITEM,
"Name=dePerson", "Value=cc", ENDITEM,
LAST);
return 0;
} |
|