Systems & Software Talk 

Visitors since August 14, 2007: Free  Web Counters
Free Hit Counters

Forcing Files to Travel With LR Scripts

08:04, 2007-Sep-8  ..  Posted in LoadRunner Tips and Tricks  ..  0 comments  ..  Link

Everyone has baggage. I have baggage. Just ask my wife and be prepared to listen for a couple of hours. LoadRunner scripts and scripts of equivalent tools are no different. This is a tip that demonstrates how to spread the wealth of baggage to LoadRunner scripts.

Why do I need to do this you might ask. Here are some reasons. You may:

  1. Have scripts that upload files, and/or
  2. Have supplemental special-purpose code when the script alone will not cut it, and/or
  3. Wish to have a readme or other knowledge-preservation file travel with the script, and/or
  4. Wish to have Mom's apple pie recipe travel with the script, and/or
  5. Wish to have a list of late-night operating pizza parlors for when you test late.

How would you then do this? Two methods follow:

First:

  1. In Vugen, select Menu -> Files -> Add Files to script
  2. Follow the prompting

Second:

Each LoadRunner script, within the script folder has a "Dot Usr" file or .usr file. Of course if you double-click the file icon, VuGen will launch - assuming VuGen is installed properly. However, if you right-mouse on it, you will see that you can "Open With...". This is key to adding baggage per the above list.

  1. Put the desired baggage file in the script folder
  2. Right-mouse/Open the target .usr file for editing (Wordpad, etc.)
  3. Locate the section named [ExtraFiles]
  4. If the section does not exist - create it. It must look like just above
  5. Open a new line under this section
  6. Add your file name (example: MyBaggage.doc) to this section as depicted below, then save and close.
  7. .\MyBaggage.doc=

Note the period or dot and the backslash, AND the equals sign (=). The "." and = sign must be present. Congratulations! You have now created more baggage. Inform your wife or significant other that you now have more baggage.

In many applications that you script for, you may encounter the need to upload a file to the system/application-under-test. The method described above removes the need to manually copy this file to every load generator.

Ok, well what if the file name needs to be different for every submit? I will expose a couple methods for doing this in a separate blog entry. Please feel free to share how you handle situations like this - either by linking to it or by commenting on this entry.

I use this quite often in conjunction with the utility under this link. I keep the baseline measurement file with the script for future reference. I also use it to ensure proper baggage handling of external custom code that is necessary for the correct operation of the script - code such as VBScript-based for specifc jobs callable via "system();" within the LR script.

 

 


 

{ Last Page }   { Page 10 of 46 }   { Next Page }

About Me

Home
My Profile
Archives
Friends
My Photo Album

Links

Corey Goldberg
Effective Testing?
Bj Rollison I.M. Testy Blog
Alan Page: Software Testing & Rants
Dmitry's LoadRunner and QTP Blog
Veterans History Project
Air Traffic Control Watch
Music Making Fun
My home 1972-1975

Categories

Functional Testing
Performance Horror
Development
Performance Testing
General
Tools Tips
Warped Humor
LoadRunner Tips and Tricks

Recent Entries

New Year’s Eve of 2010 Catastrophe In the Works
Introducing Testalis
Defect Report - Politically Correct
Performance Testing Vuser Personas – Part I
Happy Holidays 2007

Friends

LauraScharp
philk10
richardw100
aalhait
jimhazen
strazzerj
Lynnem
bru
EklecticTester
jgottlieb
leakybrain
michaeljf
prainbow
rajeshmathur
rstens
Yury
zeeslo
whollymindless

Syndication

RSS Site Feed