在脚本中显示的图片路径是服务器上的,如果我想把上传的图片进行参数化,怎么办?
测试上传图片功能 ,在脚本中显示的图片路径是服务器上的,如果我想把上传的图片进行参数化,怎么办? 说明你录制的时候没录制到所有的请求,图片都传到服务器上了,要么你现在服务器上放好图片再参数化,不过这样你测试不出来上传图片的性能了 下面是脚本 ,搞不懂呢,这也是在提交web 的请求中吧?web_submit_data("product.cz",
"Action=http://www.cmp-one.com/myaccount/sdi/product.cz?method=postBuyingLeads",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=http://www.cmp-one.com/myaccount/sdi/render.cz?method=postBuyingLeads",
"Snapshot=t18.inf",
"Mode=HTML",
ITEMDATA,
"Name=productType", "Value=BUYING", ENDITEM,
"Name=name", "Value={product}", ENDITEM,
"Name=categoryId", "Value=1153", ENDITEM,
"Name=fieldI02", "Value=", ENDITEM,
"Name=fieldI03", "Value=", ENDITEM,
"Name=fieldI04", "Value=", ENDITEM,
"Name=fieldI05", "Value=", ENDITEM,
"Name=file2", "Value=", "File=Yes", ENDITEM,
"Name=file3", "Value=", "File=Yes", ENDITEM,
"Name=file4", "Value=", "File=Yes", ENDITEM,
"Name=file5", "Value=", "File=Yes", ENDITEM,
"Name=imageUrl", "Value=/content/ff8081811b6c845b011b6cfa04820006/images/5838.gif;", ENDITEM, //上传图片就这一句,其它都是文本框提交的数据
"Name=longDescription", "Value=<p>fafdafdafdaf</p>", ENDITEM,
"Name=userfulDay", "Value=10", ENDITEM,
"Name=uom", "Value=涓\\xAA", ENDITEM,
"Name=currencyType", "Value=CNY", ENDITEM,
"Name=price", "Value=34", ENDITEM,
"Name=quantity", "Value=3", ENDITEM,
"Name=minOrderQuantity", "Value=2", ENDITEM,
"Name=shippingTerm", "Value=1", ENDITEM,
"Name=isSubscribeLead", "Value=", ENDITEM,
"Name=subscribeKeyword", "Value=绾告祮", ENDITEM,
LAST); 但是你要怎么验证呢?图片放到服务器上之后名字应该是一串随机的数字吧。还是因要上传的那个submit返回成功就行了?
页:
[1]