-
Junior Member
Loadrunner script with attachment files
Hi,
I am recording a web application, One screen contains Browse field and i need to browse some files from my local machine. This application does not accept same document twice. During replay, it needs to select different files randomly from my machine
Can some one please advice how to overcome this, And also since i selected files from my machine, same script is not running through Load Controller.
Please advice.
Thanks
-
Expert Member
Re: Loadrunner script with attachment files
Hi,
I suppose you are http web protocol. So incase you look into Request where files are being selected for upload, you should find that filename should be specified.
Create a .dat / .csv file containing a single column name as "FileName". Enter 2-3 filename along with the full path and save the file.
Now navigate to the section where the file is getting selected. Right Click on the filename and select "Replace with a Parameter" option. Browse and select the saved .csv / .dat file.
Select unique under the Occurence column.
This would ensure that for every iteration, a new file is selected. Incase you wish to re-use the data in a cyclic manner, once your action is completed, in your vuser_end include a code where the uploaded file is deleted at the end.
As regards running in the controller, pass the filepath in the .csv file with complete UNC path including your machine IP address. Also select Load Generator as your machine IP to ensure faster connectivity.
Cheers....
-
Junior Member
Re: Loadrunner script with attachment files
Hi Umesh,
Thank you for your reply. It's working fine in Load controller
Thanks,
-
Junior Member
Re: Loadrunner script with attachment files
Hi Umesh,
For some scripts, this is working but for some, it is throwing below warning message and script is failing:
Warning -26488: Could not obtain information about submitted file "C:\Program Files\Mercury Interactive\VUser Generator\scripts\EDMS scripts for Audit Trail Triggers\PFG Electronic chec in\\venkatam2k\EDMS\Test Electronic document 1.doc": _stat rc=-1, errno=2 [No such file or directory]. Using an empty file [MsgId: MWAR-26488]
Actually in my application, we have different screens for uploading a document. In some screens, it is accepting and in some cases, filename is taking from the Path where the script exactly loaded and this is causing problem
Please advice
-
Expert Member
Re: Loadrunner script with attachment files
Hi Sai,
Possible reason could be that you have missed out parameterizing the file path in some scripts.
Please check that no script uses a constant absoulte path as recorded. All scripts should be having the file upload path parameterized and specify the UNC path for all files.
Also introduce a small code to check for file existence prior to the step of uploading the file. The function could be something on these lines -
File *fp = fOpen("file","r");
if (fp)
{
lr_output_message "file Exists";
}
else
{
lr_output_message "File Missing";
)
Specify the path used in File Upload Parmeter at the place where file is used in the first line.
Cheers...
-
Junior Member
Re: Loadrunner script with attachment files
Please anyone help how to capture cookie value in load runner which we tried to correlate the cookie value in the tree view but we are not able find the value. We are trying to correlate the cart key cookie values. We are seeing response body but not able to see anything in tree view ****** response body for transaction with id 423 ****** minicart.finalizeadditem({errormessage:"",cart:{cartkey:"601812",cartname:"cart",numberofitems:"1",totalvalue:"435.00",currencydescription:"usd",itemlist:[{sku:"11668019",linekey:"623844",name:"lipofectamine™ 2000 transfection reagent",quantity:"1",unitprice:"435.00",totalprice:"435.00",editflag:"n",configflag:"n",editurl:""}]},jsessionid:"81c0a97bdc91a52f8257c39aef98bc81"}); $$$$$$ response body for transaction with id 423 ended $$$$$$
-
Junior Member
Re: Loadrunner script with attachment files
I am recording a web application, One screen contains Browse field and i need to browse some files from my local machine. This application does not records the path from where i am browsing that file and i am not able to attach that file while running the recorded script
Can some one please advice how to overcome this,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules