|
各位大虾你们好。因为今儿公司马上要求压一个这个的需求:上传附件,并发50个人。
小女子的脚本是这样的:
Action()
{
web_add_header("Accept-Language",
"zh-cn");
web_custom_request("fileWin.action",
"URL=http://192.168.10.98:6080/uie-webapp/common/fileWin.action",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.10.98:6080/uie-webapp/main.action?_domain=test.com#",
"Snapshot=t242.inf",
"Mode=HTTP",
"EncType=",
LAST);
web_add_header("Accept-Language",
"zh-CN");
web_url("ui-bg_glass_50_3baae3_1x400.png",
"URL=http://192.168.10.98:6080/uie-webapp/common-themes/cupertino/images/ui-bg_glass_50_3baae3_1x400.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.10.98:6080/uie-webapp/main.action?_domain=test.com",
"Snapshot=t243.inf",
LAST);
web_add_header("Accept-Language",
"zh-CN");
web_submit_data("postFileUpload.action",
"Action=http://192.168.10.98:6080/uie-webapp/common/postFileUpload.action",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=http://192.168.10.98:6080/uie-webapp/main.action?_domain=test.com",
"Snapshot=t244.inf",
"Mode=HTTP",
ITEMDATA,
"Name=beiwanglu", "Value=D:\Program Files\HP\LoadRunner\scripts\submit1\data\beiwanglu.doc", "File=Yes", ENDITEM,
"Name=uploadType", "Value=inpdetail", ENDITEM,
LAST);
return 0;
}
只录制了附件上传的那一部分,因为小女子是新手,所以附件上传的脚本都是在网上找来东拼西凑的,
脚本回放后 报如下的错误:
Action.c(32): Error -26488: Could not obtain information about submitted file "Drogram FilesHPLoadRunnerscriptssubmit1dataeiwanglu.doc": _stat32 rc=-1, errno=2 [No such file or directory]. Using an empty file [MsgId: MERR-26488]
Action.c(32): Aborting pending download of URL="http://192.168.10.98:6080/uie-webapp/common/postFileUpload.action" [MsgId: MMSG-27656]
Action.c(32): web_submit_data("postFileUpload.action") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
Ending action Action.
因为公司要求很急,带我的师傅也不在,这是小女子独自完成的,只有请求各位大虾,帮帮小女子,谢谢大家 |
|