.csv file upload script in Vugen

266 views
Skip to first unread message

Anaz Mohamed

unread,
May 22, 2010, 11:53:19 AM5/22/10
to LR-Loa...@googlegroups.com
Hi All,
 
I have a requirement were in need to
 
1.Create a .csv file (i guess  "c" lang func fopen will do )
2.Create data, rows and columns in .csv file ( this as per the data required in need create the code
3.Upload the .csv file (? i need to try a recording while the upload)
 
i have one more question too, do i need to  create two separate codes
1. Script for creating the data
 and then call the second  
2.Script for uploading the file script
 
If possible pls help me on this
 
Thanks in advance
 
Yes i clearly know that Vugen is not for recording client side activity but in some case we need to do the opposite
Thanks again
--
Regards,
Anaz

--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

James Pulley

unread,
May 22, 2010, 12:34:18 PM5/22/10
to lr-loa...@googlegroups.com

Script for creating the data”

 

Yes, this would be a C function, not a decoupled script

 

“Script for uploading the file script”

 

Yes, this would likely be a second function or the main body of the script.

 

Int Build_CSV_File(char * filename)

{

            //  Your ‘C’ code to write our your file

            Return 0;

}

 

Int Upload_MyFile(char * filename)

{

            // Your recorded upload which includes a relative path to the directory

// of your virtual user while executing

            Return 0;

}

 

Int Cleanup_MyFile(char * filename)

{

            // Your code to delete the file

            // Programming is just like camping.   When you pack something in of temporary use

// then you should pack it out, or in this case delete the file which you just created to

            // avoid filling your file system

            Return 0;

}

 

Action()

{

            Char * myfilename= lr_eval_string(“{group_name}_{virtual_user_number}_{iteration_number}.csv”);

            Build_CSV_File(myfilename);

            Upload_MyFile(myfilename);

            Cleanup_MyFile(myfilename);

            Return 0;

}

 

Time to pick up the same set of books I recommended to my own brother and uncle when they were learning ‘C,’ C for Dummies.   Aside from the title which is problematic for a lot of people, the books are quite good for those who need refinement of their C skills.    The question asked seems to indicate that you may fall into this group

 

James Pulley

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

Trained.  Mentored.  On shore.  Off site.   Start Saving money today

on every hour of LoadRunner services needed by your organization.

http://www.loadrunnerbythehour.com/PricingMatrix   beginning at

$19.95 USD

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

Don

unread,
May 22, 2010, 12:48:50 PM5/22/10
to lr-loa...@googlegroups.com
--
Regards,
Donbosco

Anaz Mohamed

unread,
May 23, 2010, 9:08:47 AM5/23/10
to lr-loa...@googlegroups.com
Hi JamesPulley
 
Thank you very much for your response
 
Can you pls share some sample (example scripts ) for the same
 
Creating and uploading the file

James Pulley

unread,
May 23, 2010, 12:05:29 PM5/23/10
to lr-loa...@googlegroups.com

Sure, I’d be happy to.   Please contact me with your full requirements and I will be happy to provide you a quote for services to complete your scripts for you on a one-off basis.   Or, you may refer to my public fee schedule for longer term services located at http://www.loadrunnerbythehour.com/PricingMatrix .

 

James Pulley

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

http://www.LoadRunnerbythehour.com

http://www.thescriptfarm.com

http://www.powertest.com

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

Anaz Mohamed

unread,
May 24, 2010, 5:21:12 AM5/24/10
to lr-loa...@googlegroups.com
Thanks James
 
I wil contact you if required but thank you very much for the help
 
Regards,
Anaz

Reply all
Reply to author
Forward
0 new messages