• Vugen: strcmp Example

    Posted on July 25, 2012 by Admin

    I was asked to post a simple strcmp example for use in Vugen scripting. Here it is:
    if (strcmp(lr_eval_string(“{pParameter}”), “”) == 0)
    lr_error_message(“No parameter value captured. Ending iteration.”);
    return 0;
    lr_output_message(“The parameter value is %s”,
    Anyone care to elaborate in the comments section as to what this code is doing? Read Entire Entry

  • Vugen: Replace Any String With Another

    Posted on July 23, 2012 by Admin

    Here is an easy way to replace anything with anything in a captured string in your LoadRunner Vugen script. It is a function called “string_replace”. Place this in the top of your action section, right after the include but before the main section begins:

    char *string_replace(char *input_string,
    char *substring_to_be_replaced,
    char *substitution_string)


    // strstr function declaration
    char *strstr(const char *s1, const char *s2);

    // newstring variable the new string to be returned
    // increase the buffer size if needed. Read Entire Entry

  • Vugen: HTML and URL Recording Options Compared

    Posted on July 18, 2012 by Admin

    In LoadRunner Vugen, there are two general modes of recording: HTML and URL.

    HTML (Context Sensitive) is usually preferred for several reasons. Firstly, because it is “context sensitive” , i.e. each mouse click recorded in the script is made in the context of the previous step/page. In order to maintain context it looks through the previous page to make sure the current operation is available. This adds extra overhead because it is performed by a background utility called the run-time parser. Although the parser uses extra overhead Read Entire Entry

  • Vugen: Using LAST Value For web_reg_save_param_ex

    Posted on July 16, 2012 by Admin

    Whenever the ORD=ALL attribute is used with the web_reg_save_param_ex function, VuGen creates an array containing the number of instances that are actually captured. It also stores the total count for the number of instances automatically. This count can be referenced by getting the value of “_count”. For example, if the parameter name is ParamName, a separate parameter ParamName_count will be available with number of times the value was captured. This can also serve as index for last values captured. Use the sample code below to Read Entire Entry

  • Vugen: Simulate Various Browser Behaviors

    Posted on July 12, 2012 by Admin

    Let’s discuss the various Browser Emulation settings in Vugen’s Run-Time Settings.
    The “Simulate browser cache” option tells LoadRunner to “pretend” that it has a cache stored in the current session, and to keep track of the resources it has already downloaded. If a resource is in the cache and it is requested again by a new step in the Vugen script, it will not request this resource again from the server for that session. This is how a browser would typically behave unless the user has altered the browser cache settings.

    Th Read Entire Entry

  • Vugen: Will This Code Remove Trailing Spaces?

    Posted on July 9, 2012 by Admin

    Let’s have a little fun today – and hopefully I can get some interaction from you C Guru’s out there. How about something cryptic in C? Let’s say I wanted to remove some trailing spaces with as few lines of C code as possible. Will the example below work?
    static char* rtrim( char* s)
    int i;
    if (s){i = strlen(s); while ((–i)>0 && isspace(s[i]) ) s[i]=0;}
    return s;
    Why or why not? Care to explain what this code is doing? Comments are open and welcome. Read Entire Entry

  • Vugen: Gracefully Handle Various HTTP Return Codes

    Posted on July 2, 2012 by Admin

    There may be times where you want to build in logic for how your Vuser reacts to the various types of HTTP status return codes received throughout a script. For example, as web servers get overloaded, they may start sending 503 return codes. If you wanted to try and resubmit and finish out the transaction, this might be a more graceful way to handle the occasional 503 than just giving up and killing the iteration immediately. Of course, as the load continues to increase, the 503’s will become more frequent and eventually you will Read Entire Entry

  • 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

  • One Click Creation Of Load Test Project Folders

    Posted on June 25, 2012 by Admin

    This simple script is something I use to create initial folders for my load testing projects. It save a little bit of time and ensures I always create the same folder structure. You need VBScript (vbs) files to be allowed to execute or it may not work properly for you. Install Windows Scripting Host if you do not already have the ability to do it on your machine. I have tested it on X pand Windows 7 and it seems to run fine. Paste this into a text file and then rename it to a .vbs extension. Then execute it. There should be a prompt Read Entire Entry

  • LoadRunner 11.5 – AJAX TruClient For IE

    Posted on June 22, 2012 by Admin

    With the move to LoadRunner 11.5, there have been updates and changes to the AJAX TruClient protocol. More specifically, there have been improvements and modifications for using it with FireFox as well as a new addition in way of support for Internet Explorer 9 with the AJAX TruClient protocol.

    Firefox Enhancements

    With the release of Firefox 8 in November of 2011, Loadrunner 11.5 takes advantage of the improvements that are brought to the table by Mozilla. These items include improved audio and video elements, and other HTM Read Entire Entry