Blog
Categories
- Agile
- Best Practices
- Center of Excellence
- Cloud
- Featured
- Functional Testing and Automation
- Giveaway
- Healthcare IT
- HP
- HP Discover Conference
- HP Software Patches
- Latest News
- LoadRunner
- Methodology
- Mobile
- Northway Navigator Club News
- Operating Systems
- Performance Testing and Automation
- Quality Assurance
- Security
- Service Virtualization
- SiteScope
- Training
- TweakLR
- Uncategorized
- VuGen Code
Archives
- April 2019
- September 2018
- July 2018
- June 2018
- October 2017
- August 2016
- April 2015
- February 2015
- September 2014
- August 2014
- May 2014
- April 2014
- March 2014
- October 2013
- September 2013
- August 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- February 2011
- July 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- September 2007
- August 2007
- July 2007
- October 2006
- April 2006
- March 2005
- October 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- April 2003
-
LoadRunner VuGen: Build Your Own web_custom_request
Posted on June 27, 2012 by Admin
Guest article from Tony Gartrell.
There are occasions where a dynamic web_submit_data function needs to be built pro grammatically. Sometimes it is possible to work around them by only sending the information that has changed since the last form submit. But there are times where this is not be possible. For example, take the “cancel itinerary” step in the HP Web Tour test application (that comes with LoadRunner) when recorded in Explicit URL or URL mode. You get a request like this:This list will change as more flights ar Read Entire Entry
-
VuGen: Emulate Web Site User Abandonment
Posted on June 18, 2012 by Admin
Let’s discuss the “ResourceByteLimit ” option in web_url() function within VuGen. This attributes can help emulate a user that does not wait for a complete page to download before clicking on another URL. It is typically used for testing the availability of a site (as opposed to load testing a site) while minimizing network traffic.
Before each resource download, the script replay engine will check if the total download size is less than the ResourceByteLimit specified. If so, it will continue the download. Else, it will stop the Read Entire Entry -
VuGen: Correlation With Dynamic Boundaries
Posted on June 8, 2012 by Admin
Even though the web_reg_save_param function was deprecated in the Vugen function reference and “readme” file for LoadRunner 11, please note that the NEW function, web_reg_save_param_ex is NOT what is automatically used by Vugen to correlate data during recording (in a case where you might have the Correlation Studio working to auto-correlate) for the web/http protocol. It still uses web_reg_save_param. As per the function reference, you will have to code web_reg_save_param_ex in manually.
If you attempt to take a script with Read Entire Entry -
VuGen: Trim Strings With Dynamic Lengths On Left
Posted on April 12, 2010 by Admin
Sometimes you need to strip off the first part of a string because there is some character and/or amount of crap at the end that you don’t need. The most obvious use of this is when you capture an e-mail address as a parameter and the string is like:
giggity@loadfreakintester.com
Let’s say all you need is the “giggity”, and not the rest. If you capture the exact same thing each time, you can just strip off anything after the 7th character. But what if the next time you run the script you captur Read Entire Entry
-
Troubleshoot LoadRunner VuGen Errors Loading Custom DLL’s
Posted on March 31, 2010 by Admin
Issue: While using the lr_load_dll function, the user receives the following error:
“Action1.c(x): Error -19890 : C-interpreter run time error:
Action1.c(x): Error — File error : LoadLibrary(c:\temp\MyDll.dll) failed : The specified module could not be found.”
The error above can occur if the compiler fails to locate or load the DLL. You can check the return code of lr_load_dll to verify if this is the case.Example code:
//—begin code—//
int x;
x = lr_load_dll(“MyDLL.dll”);
lr_message(“return code = %d”, x);
//—-en Read Entire Entry -
VuGen: HTML/URL/Text Conversion
Posted on March 18, 2010 by Admin
The web_convert_param function either converts HTML text to plain text or URL, or converts plain text to URL.
HTML format uses codes for some non-alphanumerical characters, such as & for ampersand. URLs do not support non alpha-numerical characters and use the escape sequence %number, to represent them. To use an HTML value in a URL, you must therefore convert it into an escape sequence or plain text. For example, an ampersand is represented in a URL as %26. When you use this function to convert the HTML to plain text, i Read Entire Entry
-
VuGen: Open A File On A Remote Machine
Posted on February 2, 2010 by Admin
The user wants to open a file existing on a remote machine in VuGen, but using the fopen function causes a C interpreter error. What this error means is that there was something wrong in the syntax, but the problem comes up only when file is stored in the remote machine.
The host name itself contains two backslashes as a part of the name. So, in order to specify the complete path of the host machine, you need to precede each backslash with another backslash.
NOTE: when adding script to Controller, you need to add yourfile.txt Read Entire Entry
-
LoadRunner VuGen: DO Loop Example
Posted on November 12, 2009 by Admin
Most people who use Vugen and have a development background know loops. In C or most other programming languages, a loop is a loop. Sometimes in my classes I will ask students the main difference between a “do while” loop verses a “while” loop to see if they have that programming background. A “do” loop requires that the code you want to run does execute at least once before checking the condition to see if it should run again. But how about a real world example when scripting for a load test?
How about trying to click a refres Read Entire Entry
-
VuGen: More Random Selections
Posted on October 14, 2009 by Admin
/*
The following lines will capture a list returned from a web server page response and
then randomly select one of the items from that list and pass it on
to the next URL
*/int rNum;
char x[500];web_reg_save_param(“temp_cat”,
“LB=abcdef”,
“RB=xyz”,
“Ord=ALL”,
LAST);web_url(“index.jsp”,
“Some URL’s”,
LAST);//srand is called before rand
srand(time(NULL));
rNum= rand() % atoi(lr_eval_string(“{temp_cat_count}”)) + 1;
lr_output_message (“A number between 1 and temp_cat_count: %d\n”, rNum);
/* rNum will be some rando Read Entire Entry
-
VuGen: Dynamic Transactions Created From A Parameter File
Posted on August 28, 2009 by Admin
From Michael Hendershot
Based on the search item I choose, I want a different transaction. This pulls the transaction name from parameter file and generates the transaction name off the “SearchFieldTransaction” column in my parameter file. Be careful. Tree view will take the “tmptransactionname” out of the lr_start and lr_end transaction.
Code:
Action()
{
char tmptransactionname[25];sprintf(tmptransactionname,”%s”,lr_eval_string(“{SearchFieldTransaction}”));
lr_start_transaction(tmpt Read Entire Entry
-