TA的每日心情 | 开心 2015-11-5 15:12 |
---|
签到天数: 2 天 连续签到: 1 天 [LV.1]测试小兵
|
情况是这样的... 我现在需要做个针对QC9.2压力测试的脚本.. 录制和脚本生成部分都很顺利,但是在回放的时候出现了以下问题..(安全起见,替换了部分URL为"*")
Action.c(42): Error -26628: HTTP Status-Code=403 (Forbidden) for "http://www.***.com/qcbin/servlet/tdservlet/TDAPI_GeneralWebTreatment" [MsgId: MERR-26628]
Action.c(42): web_custom_request("TDAPI_GeneralWebTreatment") highest severity level was "ERROR", 962 body bytes, 324 header bytes [MsgId: MMSG-26388]
遇到这样的情况我第一影像是关联没有做好...立即扫描,没能找到关联..于是我在打开自动关联的情况下(enable correlation during recording)又录了一次..脚本之中仍然没有关联.但是我却惊奇的发现,两次录制下来的脚本是一模一样的..(因此我在怀疑到底是否是关联而导致的错误了)
以下部分为脚本
lr_start_transaction("1010_HOME");
web_reg_find("Text=HP Quality Center 9.2",
LAST);
web_url("start_a.htm",
"URL=http://www.***.com/qcbin/start_a.htm",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=servlet/tdservlet?method=ListExtensionFolder", ENDITEM,
"URL=setup_a.cab", ENDITEM,
LAST);
lr_end_transaction("1010_HOME", LR_AUTO);
lr_think_time(10);
lr_start_transaction("1020_LOGIN_PAGE");
web_custom_request("tdservlet",
"URL=http://www.***.com/qcbin/servlet/tdservlet",
"Method=GET",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_custom_request("TDAPI_GeneralWebTreatment",
"URL=http://www.***.com/qcbin/servlet/tdservlet/TDAPI_GeneralWebTreatment",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=application/octet-stream",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
"EncType=text/html; charset=UTF-8",
"BodyBinary={\r\n"
"0: \"0:conststr: Login\",\r\n"
"1: \"0:int:2\",\r\n"
"2: \"0:int:-1\",\r\n"
"3: \"0:int:-1\",\r\n"
"4: \\x5C00000045\\x5C0:conststr: {\r\n"
"USER_NAME:{UID},\r\n"
" PASSWORD:{PASSWORD},\r\n"
"CLIENTTYPE:OTAClient\r\n"
"}\r\n"
",\r\n"
"5: \\x5C00000013\\x5C0:conststr:{Hostname},\r\n"
"6: \"65536:str:0\",\r\n"
"7: \"0:pint:0\",\r\n"
"8: \"0:pint:0\",\r\n"
"9: \"0:pint:0\"\r\n"
"}\r\n",
LAST);
lr_end_transaction("1020_LOGIN_PAGE", LR_AUTO);
当脚本跑到请求TDAPI_GeneralWebTreatment页面的时候就会提示上面的错误....
个人人为TDAPI_GeneralWebTreatment里面的以下东西中可能存在关联..
"0: \"0:conststr: Login\",\r\n"
"1: \"0:int:2\",\r\n"
"2: \"0:int:-1\",\r\n"
"3: \"0:int:-1\",\r\n"
"4: \\x5C00000045\\x5C0:conststr:{\r\n"
" USER_NAME:{UID},\r\n"
" PASSWORD:{PASSWORD},\r\n"
"CLIENTTYPE:OTAClient\r\n"
"}\r\n"
",\r\n"
"5: \\x5C00000013\\x5C0:conststr:{Hostname},\r\n"
"6: \"65536:str:0\",\r\n"
"7: \"0:pint:0\",\r\n"
"8: \"0:pint:0\",\r\n"
"9: \"0:pint:0\"\r\n"
"}\r\n",
于是我查看了前面两个页面的server response.. 无奈.. 找不到任何相关的信息...
以下为LR版本信息
Product Name: Mercury LoadRunner 8.1
Product Version: 8.1.0.0
Product Build: 1735
Installed Patches:
Patch Name
LR81P126
有高手能帮给我点建议么?
脚本实在通不了
谢谢了...
[ 本帖最后由 stone0214 于 2007-12-25 20:10 编辑 ] |
|