Re: error in upload a file script in Performance centre

790 views
Skip to first unread message

Abhishek Banginwar

unread,
May 3, 2013, 9:29:51 AM5/3/13
to LR-Loa...@googlegroups.com

Use relative path. Place the file at a location accessible in network or place in lg directly.

-A

On 3 May 2013 15:34, "joel" <nik...@gmail.com> wrote:
Hi All,

I face an issue while running a script in performance center which has upload a file

the code I have used is ""Name=attachments", "Value=test.pdf", "File=yes", ENDITEM, "

In vugen I keep the file in the same script folder and it works fine. 

But when I upload the file in PC11(zip all files from the folder not only runtime settings) and run I get an error saying "could not obtain information about the file c://tmp//brr_rmee.250....."

Clearly I understand that the file is not copied to the load generator and the PC is not able to find the file.

Can anyone help me with this?

PS: However scripts works fine when I specify the path and save the file in the Load Generator. I just want to know why this method doesnt work with PC

Thanks

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Pulley

unread,
May 3, 2013, 1:08:10 PM5/3/13
to LR-Loa...@googlegroups.com
Include it as an extra file with the script.   This way the file will be transferred with the script between dev host and performance center and then when PC transfers to controller and generator the file will be transferred again.    Then just use the local script directly context for uploading the file.

I do have a question, do you foresee an issue with having all of your virtual users for a given business process type uploading the exact same file in terms of name, size, content, etc...?   Would this be  marked break from what would happen in production with your users?   If so, do you need a reconciliation method to produce dynamic PDF files on the fly?  (Yes, that is purely a sales question....)

James Pulley

James Pulley

unread,
May 8, 2013, 4:15:13 PM5/8/13
to LR-Loa...@googlegroups.com

File->Add Files to Script

 

From: LR-Loa...@googlegroups.com [mailto:LR-Loa...@googlegroups.com] On Behalf Of joel
Sent: Tuesday, May 07, 2013 10:37 PM
To: LR-Loa...@googlegroups.com
Subject: Re: error in upload a file script in Performance centre

 

By include file I guess you mean attach the file separately with the script in the attachment section. If that so I tried attaching the file(zipped and non zipped) and it dint work .The Controller dint transfer the file to the LG where it is trying to find. Am I doing something wrong?

 

Yes I have seen issue with uploading the the file with same name (doesn't matter with content and size) by a huge number of virtual users at the same time (verified by rendezvous point).  So I change the uploading file to different names by parameterizing (with same content and size) and there was no issue with any of the users.

 

However I wanted to know the reason for this behavior but was denied by the client saying this situation would not occur where 100 users uploading the same file with same name at the same time.

 

I believe this would be a break in production too if any such scenario occur.

 

PS: The error was just " Unable to Upload the file" . Where as this dint apear when file name was changed

Leslie Murphy

unread,
Oct 7, 2014, 2:34:47 PM10/7/14
to LR-Loa...@googlegroups.com, james....@jamespulley.com
FYI when I ran a test using an "Extra Files" PDF document for a script that uploaded a file attachment, this is what was sent to the server in the POST request multipart form:

C:\Program Files (x86)\HP\Load Generator\Temp\brr_YAR.891\netdir\C\Users\lesmurphy\Desktop\PSFT\S02_PS_JOURNALS\Test 700K Attachment Document.pdf 

Evidently the place where the script resources are stored within the LG takes on the full original directory of where the Script was created.  Looking inside the directory on the LG I see that all of the C files, prm, urr, dat files are present.   A bit bizarre, but seems to work.  

One possible drawback of storing a file attachment in the script is that a copy will be created on the file system for each VUser.

I noted that when running the LG agent service as a local system account I could not use the UNC method (\\fileserver\LR_DATA_FILES) for a multipart/form-data file attachment.  Storing the file as a extra resource in the script is one workaround.  The other is to run the service using service account credentials.

Hope that helps -- Les

On Thursday, May 9, 2013 1:44:29 AM UTC-6, joel wrote:
That worked. Don't know How I missed that one. Need to brush up things. 
Thanks
Reply all
Reply to author
Forward
0 new messages