loadrunner测试文件上传,新手,请各位帮帮我,谢谢了~
怎么测试呢?有的说要参数化,有的说要关联,有的说要添加代码!到底怎么弄!求高人解答啊,下面是我的上传部分的Action:
UP()
{
lr_think_time(9);
web_url("upload-button-sprite.png",
"URL=http://192.168.1.17:8080/share/res/themes/default/images/upload-button-sprite.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://192.168.1.17:8080/share/res/yui/uploader/assets/uploader.swf?dt=1318831792609",
"Snapshot=t20.inf",
LAST);
lr_think_time(39);
web_submit_data("upload;jsessionid=EBCF13D735F09304E62ABF726C479C24",
"Action=http://192.168.1.17:8080/share/proxy/alfresco/api/upload;jsessionid=EBCF13D735F09304E62ABF726C479C24",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=application/json",
"Referer=",
"Snapshot=t21.inf",
"Mode=HTML",
ITEMDATA,
"Name=Filename", "Value=3_m.pdf", ENDITEM,
"Name=contentType", "Value=cm:content", ENDITEM,
"Name=destination", "Value=workspace://SpacesStore/5b4703e9-d871-4fb0-9226-0ca7d98f7e01", ENDITEM,
"Name=thumbnails", "Value=doclib", ENDITEM,
"Name=username", "Value=null", ENDITEM,
"Name=overwrite", "Value=false", ENDITEM,
"Name=filedata", "Value=3_m.pdf", "File=Yes", ENDITEM,
"Name=Upload", "Value=Submit Query", ENDITEM,
EXTRARES,
"Url=../slingshot/doclib/doclist/documents/node/alfresco/company/home/%E4%B8%AA%E4%BA%BA%E7%A9%BA%E9%97%B4/%E5%BC%A0%E9%B9%8F%E7%9A%84%E7%A9%BA%E9%97%B4?filter=path&size=50&pos=1&noCache=1318831897859&libraryRoot=alfresco%3A%2F%2Fcompany%2Fhome", "Referer=http://192.168.1.17:8080/share/page/repository#filter=path%7C/%25u4E2A%25u4EBA%25u7A7A%25u95F4/%25u5F20%25u9E4F%25u7684%25u7A7A%25u95F4&page=1", ENDITEM,
"Url=node/workspace/SpacesStore/7c2a1dda-0465-489a-8037-96e085dfef91/content/thumbnails/doclib?c=queue&ph=true", "Referer=http://192.168.1.17:8080/share/page/repository", ENDITEM,
"Url=../slingshot/doclib/doclist/documents/node/alfresco/company/home/%E4%B8%AA%E4%BA%BA%E7%A9%BA%E9%97%B4/%E5%BC%A0%E9%B9%8F%E7%9A%84%E7%A9%BA%E9%97%B4?filter=path&size=50&pos=1&noCache=1318831897906&libraryRoot=alfresco%3A%2F%2Fcompany%2Fhome", "Referer=http://192.168.1.17:8080/share/page/repository#filter=path%7C/%25u4E2A%25u4EBA%25u7A7A%25u95F4/%25u5F20%25u9E4F%25u7684%25u7A7A%25u95F4&page=1", ENDITEM,
LAST);
return 0;
} 你这个代码贴了人家也没法帮你,因为根本不知道你们系统怎么处理的
workspace://SpacesStore/5b4703e9-d871-4fb0-9226-0ca7d98f7e01
这个东西可能要关联
"Name=filedata", "Value=3_m.pdf"
这个应该要带个路径否则回放会找不到文件 回复 2# 云层
好的,谢啦老大~我去研究研究~ 学习,录制下来的东西很多都需要关联。
关联的数据有哪些特点呢:1、属于一定是有客户端发往服务器端的数据要关联,
2、这些数据是有服务器端产生,事先已经发给客户短的数据。 "Name=Filename", "Value=3_m.pdf", ENDITEM,
"Name=contentType", "Value=cm:content", ENDITEM,
"Name=destination", "Value=workspace://SpacesStore/5b4703e9-d871-4fb0-9226-0ca7d98f7e01", ENDITEM,
"Name=thumbnails", "Value=doclib", ENDITEM,
"Name=username", "Value=null", ENDITEM,
"Name=overwrite", "Value=false", ENDITEM,
"Name=filedata", "Value=3_m.pdf", "File=Yes", ENDITEM,
"Name=Upload",
请问下,name=filename,是对上传文件进行重命名吗?对上传文件重命名为filename吗?
页:
[1]