0

我正在尝试使用 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 以及如何解决该问题?

4

1 回答 1

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

于 2018-03-09T15:00:58.810 回答