Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..
767 views

Loadrunner recording error while uploading file

Dear All,

 

I am using Loadrunner 12.00 for Web(HTTP/HTML) scripting.  

 

During VuGen recording, I need to upload .docx file but i am getting the error "Error while uploading file: {}"

 

When i click the browse button, i get a new window or dialog/browse box to select file, i select the file and i get the error  "Error while uploading file: {}" or tried to enter the path in the dialog box and i get the same error

 

Kindly advise

 

Thanks

 

0 Likes
12 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Loadrunner recording error while uploading file

Hello Ravi4it,

 

Please note that VuGen is to develop a Vuser script by recording a user performing typical business processes on a client
application. VuGen records the actions that you perform during the recording session, recording only the activity between the client and the server. 

During recording, VuGen monitors the client and traces all the requests sent to and received from
the server.

 

As in this case, the action to upload the file is from your local machine, unfortunatley VuGen is not going to be able to record this step.

 

However, yes is possible to upload a file but you need to use a web_custom_request function.

 

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".

 

The only detail that you need to be aware, is that this include custom code that you need to create in order to add the correct code.

 

Also, if you can share a screenshot from the error message that you are having would be great.

 

For more information you can refer to this KB: https://softwaresupport.hp.com/group/softwaresupport/search-result/-/facetsearch/document/KM175842

 

Regards,

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: Loadrunner recording error while uploading file

Hi dani-G,

 

Many thanks for your advise.

 

Even though the upload a document fails during recording, Web_custom_request is recorded. I have added the BodyFile Path extra to the web_custom_request which was missing. However i am getting the error during replay.

 

============

Action.c(925):     <Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does
Action.c(925):      not match the signature you provided. Check your key and signing method.</Message><AWSAcc
Action.c(925):     essKeyId>AKIAJPISJVKY2KT34IOA</AWSAccessKeyId><StringToSign>PUT\n

 

Action.c(925): Warning -26628: HTTP Status-Code=403 (Forbidden) for "https://lmn-storagetemp-pqr.com/456/Document/21259a0e-58f1-458f-ba51-c77ec25466e1.doc?..........

  [MsgId: MWAR-26628]

==================

 

Not sure if this is the certificate issue or correlation issue. In both cases, i have added the certificate and correlated the required values key and signing method. If i comment out this code, my script works well without any issues.

 

I have attached document with a snapshot of the script,  the output , error of the screenshot while uploading the file during recording.

 

Kindly advise.

 

Many thanks

 

 

 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Loadrunner recording error while uploading file

Could you please confirm, if you try to upload the file manually (without VuGen) it gets uploaded?

 

On the other hand, I appreciate if you can provide me the entire script folder with full extended logs on the replay in order to provide you a possible reason about this error message that you are reciving  regarding the signature.

 

Regards

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: Loadrunner recording error while uploading file

Hi Daniela Gomez,

 

Yes, i can upload the document manually in the website

 

Can i email you the script folder at  daniela.gomez at hp.com

 

Thanks

 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Loadrunner recording error while uploading file

Yes, you can send me the script folder to my email.

 

Regards

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Loadrunner recording error while uploading file

Hello Ravi4it,

 

I was checking the script that you sent to me yesterday and the mdrv.log, and the conclussion that I got is that looks more related to some secuirity with your amazon account that is not letting you to upload the file to the cloud during replay.

 

As I understand, you are trying to upload the file to the cloud (please correct me if I'm wrong)

 

The issue here is that Amazon is not allowing VuGen to use the keys from this account to access the virtual machine

 

At this point, my suggestion for you is to create a Service Request, in order to provide you a feasible solution to this buisness process that you are using.

 

Thank you and have a nice day.

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: Loadrunner recording error while uploading file

Hi Daniela,

 

Many thanks for looking into this.

 

That’s correct. The application is hosted on amazon cloud. The file also getting uploaded to amazon cloud.

 

What could be the potential problem, is it the certificate issue or correlation problem or  something else

 

I have a different script with same business process without the upload file functionality and it works fine.

 

Thanks

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Loadrunner recording error while uploading file

Hello Ravi,

 

From my perspective, it looks an issue related to the certificates. 

 

As this looks more complex, this probably going to need more troubleshooting and a deeper investigation, in order to find the possible root cause of this and therefore the best recommendations to record and replay successful your application.

 

Based on this my best suggestion for you is to create a ticket with technical support.

 

Thank you and have a nice day.

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: Loadrunner recording error while uploading file

Hi,

 

I have raised a ticket with HP for the same. The HP Engineers are suggesting as out of scope and not able to provide any solution.

 

Can anyone advise a solution to this issue

 

Thanks

0 Likes
Highlighted
Visitor..
Visitor..

Re: Loadrunner recording error while uploading file

Did you get this issue resolved? Do you have a solution for uploading documents to the AWS server successfully?

I have the same error, I do know that the signature in the authentication header is dynamic but I can't find the signature value in the response bodies. From the research, I did we have to use the security key, date, range, etc to create a signature key.

Thank you,

Mounika Gaddam

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Loadrunner recording error while uploading file

Option#1 - Try changing to a different browser and most likely it should work. 

Option#2 - Enable developer tools in Chrome while you upload the file and from network tab, you can see the url,header,request body, content type etc. You can then use it to insert a step in your script.

Option#3 - Use fiddler and import the .saz file into vugen.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.