我正在尝试使用loadrunner vugen上传XML文件。我已将文件放在loadrunner脚本文件中,并确保所有标头和相关值都是完美的。该文件仍未上传。当我尝试在文件后添加缺少的content-type = application / xml时,我面临内存冲突错误。
web_submit_data("Fileupload_VF_3",
"Action={P_BFCTool_URL}/Fileupload_VF",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/html",
"Referer={P_BFCTool_URL}/apex/Fileupload_VF?sfdc.tabName={C_lID}",
"Snapshot=t28.inf",
"Mode=HTTP",
ITEMDATA,
"Name={C_JID}", "Value={C_JID}", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id33:j_id35:ftype", "Value=NFeDF", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id43:j_id44:0:j_id45:fileId:inputFile:file", "Value={P_NFEDF_File}.xml", "File=yes", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id43:j_id44:1:j_id45:fileId:inputFile:file", "Value=", "File=yes", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id43:j_id44:2:j_id45:fileId:inputFile:file", "Value=", "File=yes", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id43:j_id44:3:j_id45:fileId:inputFile:file", "Value=", "File=yes", ENDITEM,
"Name=j_id0:j_id5:pgblck:j_id43:j_id44:4:j_id45:fileId:inputFile:file", "Value=", "File=yes", ENDITEM,
"Name={C_UploadJID}", "Value=Upload", ENDITEM,
"Name=com.abcd.ViewState", "Value={C_Viewstate2}", ENDITEM,
"Name=com.abcd.ViewStateVersion", "Value={C_ViewstateVersion2}", ENDITEM,
"Name=com.abcd.ViewStateMAC", "Value={C_ViewStateMAC2}", ENDITEM,
"Name=com.abcd.ViewStateCSRF", "Value={C_ViewstateCSRF2}", ENDITEM,
LAST);
在同一个脚本中,我有一个PDF上传,同样工作正常。是否可以使用loadrunner进行XML上传以及如何解决问题?
答案 0 :(得分:0)
以下方法正常工作:j_id33:j_id35:ftype“,”Value = NFeDF“,ENDITEM,”Name = j_id0:j_id5:pgblck:j_id43:j_id44:0:j_id45:fileId:inputFile:file“,”Value = filename.xml“,”FilePath =。// filename.xml“,”File = Yes“,ENDITEM