Showing posts from June, 2011

Tips on Load Runner Scripting for Smart Client

It is required to have Load Runner 8.1 or later version, since Load Runner version 7 does not record or send out http HEAD request This omission will cause the smart client not able to login to the server. These are the recording steps, applicable for both smart client and JNLP recording: Start Load Runner 8.1 Virtual User Generator. Choose New User Script from pull down menu. Choose Web(HTTP/HTML) from “ New Single Protocol Script ” Window Choose Internet Application from “ Start Recording ” Window Choose HTML-based Scripts from “Recording Options” Choose “ A script describing user_action(e.g. web_link, web_submit_form) ” and “ Record with the current script step ” from “ Advanced HTML ” Window Start the recording An Internet Explorer browser will be brought up. Type in the url for downloading the smart client, like the normal way starting from the browser. After the smart client is downloaded, a create short cut message will be display and the smart client will be starte

Monitoring Tools

Monitoring Tools E2E processes 1.   Dynatrace 2.   HP Diagnostic 3.   JMX batch monitoring Inflation/Testing 1.Mainly Load Runner 2.Using DB scripts System Statistics 1.   Load Runner 2.   Nmon 3.   Glance 4.   Spider 5.   AWR DB Monitoring 1.   OEM Java 1.   HP Jmeter 2.   Jprobe 3.   Jprofiler C++ Memory leaks/corruptions 1.   Valgrind 2.   Totalview

Files Generated

  Files Generated During Recording Assume that the recorded test has been given the name ‘vuser’ and is stored under c:\tmp. Following is a list of the more important files that are generated after recording: vuser.usr - Contains information about the virtual user: type, AUT, action files, and so forth. vuser.bak - A copy of Vuser.usr before the last save operation. default.cfg - Contains a listing of all run-time settings as defined in the VuGen application (think time, iterations, log, web). vuser.asc - The original recorded API calls. vuser.grd - Contains the column headers for grids in database scripts. default.usp - Contains the script’s run logic, including how the actions sections run. init.c - Exact copy of the Vuser_init function as seen in the VuGen main window. run.c - Exact copy of the Action function as seen in the VuGen main window. end.c - Exact copy of the Vuser_end function as seen in the VuGen main window. vdf.h - A header file of C variable definitions used in the sc

Configuring Run-Time Settings

The run-time settings define the way that the script runs. These settings are stored in the file default.cfg, located in the Vuser script directory. Run-time settings are applied to Vusers when you run a script using VuGen, the Controller. For LoadRunner, the default run-time setting support the debugging environment of VuGen and the load testing environment of the Controller. The default settings are: ➤ Think Time. Off in VuGen and Replay as Recorded in the Controller. ➤ Log. Standard in VuGen and off in the Controller. ➤ Download non-HTML resources. Enabled in VuGen and the Controller. For protocols that do NOT support multiple actions, such as WinSocket and Database (Oracle 2-tier, Sybase, MSSQL, and so on), the Iteration and Pacing options are both handled from the Pacing tab. For the LoadRunner Controller: If you specify a scenario duration in the Scheduling settings, they override the Vuser iteration settings. This means that if the duration is set to five minutes (the defa

Correlating Statements

The primary reasons for correlating statements are: 1.    To simplify or optimize your code 2.    To generate dynamic data 3.    To accommodate unique data records The main steps in correlating a script are: Determine which value to correlate: For most protocols, you can view the problematic statements in the Execution log. You double-click an error message and jump directly to its location. Alternatively, you can use the WDiff utility distributed with VuGen to determine the inconsistencies within your script. Save the results. You save the value of a query to a variable using the appropriate function. The correlating functions are protocol-specific. Correlation function names usually contain the string save_param , such as web_reg_save_param and lrs_save_param . Refer to the specific protocol chapters for an explanation on how to perform correlation. In several protocols, such as database and Web, VuGen automatically inserts the functions into your script. Reference the saved value

Working with VuGen Parameters

Parameterization involves the following two tasks: ➤ Replacing the constant values in the Vuser script with parameters ➤ Setting the properties and data source for the parameters. You can use parameterization only for the arguments within a function. You cannot parameterize text strings that are not function arguments. You can use the lr_eval_string function to “parameterize” a functionargument that you cannot parameterize by using standard parameterization.In addition, you can use the lr_eval_string function to “parameterize” any string in a Vuser script.For VB, COM, and Microsoft .NET protocols, you must use the lr.eval string function to define a parameter. For example, lr.eval_string( "{ Custom_param }"). There is no limit to the number of parameters you can create in a Vuser script. When creating XML parameters in script view, you must select only the inner xml, without the bounding tags. For example, to parameterize the complex data structure <A><B>Bele