How to upload a file to the server using web_custom_request

上一篇 / 下一篇  2012-10-22 13:06:44 / 个人分类:测试技术

How to upload a file to the server using web_custom_request

Use the "BodyFilePath=fileName" attribute

You can use the "BodyFilePath=fileName" attribute to upload a file.

Example:

web_custom_request("Mercury",
"URL=http://…",
"Method=PUT",
"Resource=1",
"RecContentType=text/plain",
"Referer=",
"BodyFilePath=fileName",
LAST);

By default, LoadRunner will look into the script. directory for the file. For such
1. When you run the script. in the Controller, it is recommended that you:
a. Highlight the group and click the "Details" button.
b. Click <More> in the pop-up window.
c. Go to the "File used by script."
d. Make sure that your file is there or click <Add> to add the file.

2. Alternatively, you can specify the full path to the script. You will need to make sure that all the machines have the file in the same location.

Example:
"BodyFilePath=c:\\full_path\\fileName".


TAG:

 

评分:0

我来说两句

Open Toolbar