• Vugen: Read A File Stream For Validation

    Posted on July 30, 2012 by Admin

    In this example we are running tasklist.exe in windows to check the existence of a process by looking at the first 13 characters in the file.

    char command[1024];
    int i, total = 0;
    char buffer[12], ch;
    char *filename = lr_eval_string(“C:\\tasklist_{pTime}.txt”);
    long file_stream;

    //Run a system command to open up a DOS prompt and tasklist
    //Save it to a file

    sprintf(command, “tasklist /FI \”IMAGENAME eq MobileEngine.exe\”
    /FI \”STATUS eq running\” /FO TABLE /NH > %s”, filename);
    sys Read Entire Entry

  • 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

  • ALM 11.5 Installation – Step by Step, Single Server Deployment

    Posted on July 19, 2012 by Admin

    During HP Discover, HP announced on June 5th, 2012 the official release of HP ALM (Application Lifecycle Management) 11.5 (formerly known as Quality Center). I am going to outline the new installation process for a single server deployment on a Windows 2008 64-bit server. This guide assumes that all prerequisites have been met and MS SQL Server 2008 R2 (or another supported database server) has been installed or is readily available.
    Update:  We recently covered what’s new in ALM 11.5. Make sure the installation environment meet 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

  • Service Test 11: How To Set HTTP Request Headers & Get HTTP Response Headers

    Posted on July 13, 2012 by Admin

    Recently one of our clients asked if it was possible to set HTTP Request Headers  and retrieve HTTP Response Headers in Service Test 11 for REST and SOAP activities. The test case began by executing an activity to authenticate and retrieve an authentication token, and that token had to be passed in an authentication header for every remaining activity. This is all possible in Service Test 11.20 – let’s take a look at how it’s done.
    Setting HTTP Request Headers
    SOAP Activities

    For SOAP activities, C# code can be added to e Read Entire Entry

  • LoadRunner 11: Capturing text using the Citrix Agent on XenApp 6.5 SOLVED

    Posted on July 13, 2012 by Admin

    Recently at one of our clients, they had an issue with not being able to capture text with the ctrx_get_text function using the 64-Bit version of the Citrix Agent for LoadRunner 11.  Read the steps here that finally fixed the issue for them. This is based on XenApp 6.5.  The client was running Windows 2008 RS SP1. This resolution references Win2008R2, but it still worked. Notice it is for version 11 Patch 2 of the Citrix Agent (not Patch 2 of LoadRunner as a whole). Patch 3 version of the Citrix agent had issues with the 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

  • Service Test 11: Programmatically Set and Get Test Variable Values

    Posted on July 11, 2012 by Admin

    Test Variables in Service Test 11 are global variables that can be accessed later in the test script, either by linking to the variable in the GUI (Link to a Data Source) or by setting the variable in the GUI (Set Test Variable activity). Both can also be done programmatically using C#. For example, it may be necessary to set a Test Variable inside an activity Event (instead of using the Set Test Variable activity). In this post, we cover the methods available within Service Test to set and retrieve Test Variables.
    Create Read Entire Entry