Tuesday 26 June 2012

Performance test environment on a virtualized platform

Create multiple virtual LoadGenerator machine instances.

Having multiple virtualized LoadGenerators on a host machine is better than having a single virtual LoadGenerator machine because the hypervisor of a virtual platform scheduler works better when there is a diverse workload than when there is a homogeneous workload. Remember that virtualization software like VMware – be it whether it is a ‘Type-1’ or ‘Type-2’ hypervisor — it is designed to support as many virtual instances as possible on a single physical machine. A simple illustration: Load generator working on single virtual machine emulating 100 Vusers is likely to use more CPU resource than when the same 100 Vusers are split across into 2 virtual machines – 2 load generators.

Please go through this link for detail information:

http://www.joecolantonio.com/2012/11/12/loadrunner-what-you-need-to-know-before-running-on-a-virtual-environment/
http://www.performancecompetence.com/wordpress/?p=160
http://www.performancecompetence.com/wordpress/?p=63

Wednesday 20 June 2012

Physical Vs Virtual Memory

RAM is the amount of physical memory installed on your computer. It acts like short-term memory, enabling programs to load and operate faster. When you start a program or an application, it uses a part of that memory. Most programs will require at least 32MB of RAM. If you look in your system tray (next to the time), there are usually four or more programs running (antivirus, firewall, and so on). Those background programs alone require 128MB. Then if you use any programs, such as a Web browser or a word processor, it requires more memory.

Windows makes up the difference for that amount of RAM requirement by allocating or reserving a portion of your hard drive to act as though it were RAM. That's what is referred to as virtual memory, or page file. The less RAM you have the more virtual memory is allocated. Windows typically manages that for you. As a standard rule of thumb, Windows creates a virtual memory of 1½ times your physical RAM. So if have 256MB of actual RAM, Windows pagefile (virtual memory) will equal 384MB.
Note: You can create virtual memory more than 1.5 times of RAM.There is no upper limitation to create virtual memory in the system.

Virtual memory is logical and physical memory is the actual available memory.
Each running process has its own virtual address space. But each virtual memory mapped either to RAM or HArddisk by the MMU(Memory Management Unit).So by virtual memory systems the computer overcomes its physical memory limitations.
Ex:
Suppose You need to run a Game, that needs 2 GB Ram, but you have only 1.5 GB RAM, If u configured Virtual Memory, then System will be able to Run the game, as it will take 512 MB HDD space as a RAM.


How to see Virtual memory in your computer:
Control Panel--> System-->Advance Tab-->Performance-->Setting-->Advance Tab-->Virtual memory-->Change



Tuesday 19 June 2012

JVM in load testing

The Java™ Virtual machine (JVM) is the application that executes a Java program and it is included in the Java package.


JVM is the main component of Java architecture and it is the part of the JRE (Java Runtime Enviroment) . JVM is a part of Java Run Time Environment that is required by every operating system requires a different JRE .


Each operating system and CPU architecture requires a  JRE.
JVM Runtime Environment contains the two parts such as:

Java API classes: Java API classes are the predefined classes required for the program compilation and interpretation.
Java Virtual Machine: JVM is also a part of the JRE. The Java Virtual Machine is responsible for interpreting Java bytecode, and translating this into actions or operating system calls .
Without the availability of a JRE for a given environment, it is impossible to run Java software.

The Java Runtime Environment (JRE), also known as Java Runtime, is part of the Java Development Kit (JDK), a set of programming tools for developing Java applications. The Java Runtime Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files.
During installation, Java Runtime Environment also deploys a plugin that facilitates the execution of applets within local browsers.
JVM is not platform independent.
The Windows JVM is different from the Unix JVM or the Linux JVM. But, your Java code can run on all three without being changed or recompiled (again, unless you interface to native methods, or use other platform-specific stuff).

Java "the language" is platform-independent. To make it so, there is a platform-specific JRE that knows how to run the platform-independent Java code on a specific platform.
Every supported operating system has its own JVM.
JDK includes a JRE as as subset. The JRE provides runtime support for Java applications. The SDK provides the Java compiler and other development tools. The SDK includes the JRE.

When we download JRE, there are different platforms to choose. That means JRE is machine dependent,

In one machine we can create more than 1 JVM. Suppose in load testing there is a problem in JVM then its not a good practice to increase the size of JVM to solve the performance issue.

For analysizing the JVM many tools are available:
1.JProfiler

You can have one JVM per process. Since an OS supports many processes, you can have many JVMs running.
When ever we start a new java process by invoking java.exe (i.e. java [class-name] ) a new instance of JVM is created. Each java process executes in its separate JVM environment – we can specify different JVM parameter for each process


More details:


Performance monitoring tool or command (UNIX) by which we can monitor the JVM behavior and statistics



Jconsole - standard freely available
Yourkit profiler - licensed 
Netbeans profiler - freely available.
JPerfmeter: Its gud one.


                                                     
What is Heap:

Java objects reside in an area called the heap. The heap is created when the JVM starts up and may increase or decrease in size while the application runs. When the heap becomes full, garbage is collected.Whenever we create any object, it’s always created in the Heap space.

JMV memory model:


JVM memory is divided into separate parts. At broad level, JVM Heap memory is physically divided into two parts – Young Generation and Old Generation.

Young Generation: Young generation is the place where all the new objects are created. When young generation is filled, garbage collection is performed. This garbage collection is called Minor GC. Young Generation is divided into three parts – Eden Memory and two Survivor Memory spaces.

Important Points about Young Generation Spaces:
  • Most of the newly created objects are located in the Eden memory space.
  • When Eden space is filled with objects, Minor GC is performed and all the survivor objects are moved to one of the survivor spaces.
  • Minor GC also checks the survivor objects and move them to the other survivor space. So at a time, one of the survivor space is always empty.
  • Objects that are survived after many cycles of GC, are moved to the Old generation memory space. Usually it’s done by setting a threshold for the age of the young generation objects before they become eligible to promote to Old generation.
Old/Tenured Generation: Old Generation memory contains the objects that are long lived and survived after many rounds of Minor GC. Usually garbage collection is performed in Old Generation memory when it’s full. Old Generation Garbage Collection is called Major GC and usually takes longer time.
 

All the Garbage Collections are “Stop the World” events because all application threads are stopped until the operation completes.Since Young generation keeps short-lived objects, Minor GC is very fast and the application doesn’t get affected by this.However Major GC takes longer time because it checks all the live objects. Major GC should be minimized because it will make your application unresponsive for the garbage collection duration. So if you have a responsive application and there are a lot of Major Garbage Collection happening, you will notice timeout errors.

Permanent Generation:Permanent Generation or “Perm Gen” contains the application metadata required by the JVM to describe the classes and methods used in the application. Note that Perm Gen is not part of Java Heap memory.Perm Gen is populated by JVM at runtime based on the classes used by the application. Perm Gen also contains Java SE library classes and methods. Perm Gen objects are garbage collected in a full garbage collection.

 Heap Size:
 
Increasing the maximum heap size setting can improve startup. When you increase the maximum heap size, you reduce the number of garbage collection occurrences with a 10 percent gain in performance.

Increasing this setting usually improves throughput until the heap becomes too large to reside in physical memory. If the heap size exceeds the available physical memory, and paging occurs, there is a noticeable decrease in performance.
Therefore, it is important that the value you specify for this property allows the heap to be contained within physical memory.

What is the process for understanding min heap requirement for a java application? 

Best practice is to keep min and max heap memory same..
 
Heap Dump Analysis
 
Heap dump analysis means to understand what is going into heap. The general idea is to dump out the contents of the JVM’s memory into a file, then analyze it using a tool.
 



Best practices in performance testing

Here are some of the most common things projects do that make performance testing difficult or less productive…




  • Stick to the requirements, even when they don’t make sense
    You should know by now that projects aren’t very good at defining their non-functional requirements. This means that it is necessary to use a certain amount of common sense when applying them to the performance test results. As an example, imagine that a response time requirement specified that average response times for login should be less than 5 seconds. During performance testing, it is found that 90% of login transactions take 1 second, but 10% take 40 seconds. On average, the response time for the login transaction is 4.9 seconds, so someone who interprets requirements very strictly would consider the response time acceptable, but anyone with good critical thinking skills would see that something is wrong and think to get the intent behind the requirement clarified.




  • Use the wrong people to do your Performance Testing
    A very common mistake is to assume that someone who does functional test automation is necessarily suited to performance testing because they know how to use another tool that is made by the same company. Another mistake is to assume that just because the project has purchased the very best tool money can buy, and it is very easy to use, this will compensate for testers who don’t know anything about performance testing (“fools with tools”). Performance testing is a highly technical activity, and is not a suitable job for anyone who cannot write code, and who does not understand how the system under test fits together.




  • Don’t provide enough technical support to investigate and fix problems
    A good way to ensure that it takes a long time to fix defects is to fail to provide someone who is capable of fixing the problem, or to provide someone who is too busy to work on the problem. Load and performance-related defects are difficult problems, which are not suitable to assign to a junior developer. It is best to make code-related performance problems the responsibility of a single senior developer, so that they have a chance to focus, and are not distracted by all the other (much easier to fix) problems in the buglist.
  • Don’t let performance testers do any investigation themselves
    Having a rigidly enforced line between testers (who find problems), and a technical team (who determine the root cause of a problem, and fix it) doesn’t work so well with performance testing. Performance testers find problems that are impossible for other teams to reproduce themselves (and it’s pretty hard to fix a problem you can’t reproduce). This means that performance testers and technical teams need to work together to determine the root cause of problems. Performance testers can do a lot of this by themselves if they have access to the right information. This means setting up infrastructure monitoring, and providing logons to servers in the test environment and access to any application logs.




  • Wishful extrapolation
    Imagine that the test system is two 2-CPU servers, and performance testing shows that it can handle 250 orders per hour. The Production system is two 8-CPU servers, so it should be able to handle 1000 orders per hour, right? Well, not necessarily; this assumes that the system scales linearly, and that CPU is the only bottleneck. Both are bad assumptions. It is best to test in a Production-like environment, or to have a very solid (experimentally proven) knowledge of how your system scales.                                                           If our 2-server system can handle 200 users, why isn’t it safe to assume that the 5-server system will handle 500 users?   
  • Using extrapolation to predict the scalability or performance of a system is rarely possible in performance testing.  Ex:                        
    Network connection speeds:
    Some users are connecting via slower mobile networks, this may hold connections open longer and affect overall system performance.
                                                       




  • Hide problems
    One of the main reasons for software testing is so that the Business stakeholders can make an informed decision about whether a new system is ready to “go live”. Often performance testers are put under pressure to downplay the severity or likelihood of any problems in their Test Summary Report. This is usually due to a conflict of interest; perhaps performance testing is the responsibility of the vendor (who is keen to hit a payment milestone), or the maybe the project manager is rewarded for hitting a go-live date more than for deploying a stable system. In either case, it is a bad outcome for the Business.

  • Following are some of these performance stats and business losses examples.    




    In September 2010, Virgin Blue's airline's check-in and online booking systems went down. Virgin Blue suffered a hardware failure, on September 26, and subsequent outage of the airline's internet booking, reservations, check-in and boarding systems. The outage severely interrupted the Virgin Blue business for a period of 11 days, affecting around 50,000 passengers and 400 flights, and was restored to normal on October 6. .There is a loss of $20million.



    • Average user clicks away after 8 seconds of delay
    • $45 billion business revenue loss due to poor web applications performance
    • In November 2009, a computerized system used by US based airlines to maintain flight plans failed for several hours causing havoc amongst all major airports. This caused huge delays to flight schedules causing inconvenience for thousands of frustrated passengers. Identified as a ‘serious efficiency problem’ by the Federal Aviation Authority, this was one of the biggest system failures in US Aviation History!
    • Aberdeen found that inadequate performance could impact revenue by up to 9%
    • Business performance begins to suffer at 5.1 seconds of delay in response times of web applications and 3.9 for critical applications and an additional second of waiting on a website significantly impact customer satisfaction and visitor conversions. Page views, conversions rate and customer satisfaction drops 11%, 7% and 16% respectively!
    • A/c to Amazon: Every 100ms delay costs 1% of sales


    Monday 18 June 2012

    Load Runner 11.5

    These are the major changes in LR11.5
    • New and Improved VuGen – The whole look and feel of VuGen has been revamped here to include much more modular panes and viewing ability. While there are a handful of default views available, these are easily modified to taste. Tree view has been replaced with the new step navigator and the new solutions explorer gives access to all actions, run time and parameter panels.
    • Ajax TruClient Firefox Enhancements – Changes here include a move to Firefox 8 and support for HTML5. Functions can be created for easy reuse and event handlers are available to support asynchronous behaviors. I think the HTML5 is a significant advancement. We’ve actually seen a demo from HP of a Vugen script playing back a game Angry Birds.
    • Ajax Truclient Internet Explorer – A new addition to the Ajax TruClient family, HP is establishing TruClient as a cross browser solution for capturing heavy AJAX front went applications. Now companies who created their application with Internet Explorer support only can find bugs under load that they would not have simply because Firefox may run different code. Applications must work in IE9 standard mode to be supported.
    • Web Protocol Asynchronous Support – the Web (HTTP/HTML) as well as Flex, Silverlight and Web Services have been modified to support advanced applications that make use of asynchronous communications such as Poll, Long Poll and Push. This means applications such as chat, messaging, stock tickers, and news updates that use various asynchronous mechanisms should be easier to script against.
    • Improved Correlations – Correlations can now be found based on server responses during recording, so you don’t always have to play it back at least one to start correlation. Coupled with the new Correlation Studio interface, introduced in LR 11 which gives us regular expressions and XPATH, scripting becomes easier and faster.
    • Flex Enhancements – Improvements here include use of Web Correlation mechanisms, support for Web requests and the bundling of Adobe Flex platform jars into the application. In addition, there is now support for RTMP FMS streaming, RTMPT, RTMPS and GraniteDS.
    • Mobile Protocols– Initially introduced in FP4 of LoadRunner 11, these protocols enabe script development for http-based and native mobile applications. Traffic based analysis is used for native applications and Ajax TruClient technology is used for browser based mobile applications.
    • Data Format Extension (DFE) for Google Web Toolkit (GWT) – In addition to the already supported formats of Base64, JSON, URLEncoding, XML and Prefix-Postfix, support is now included for Google Web Toolkit (GWT). This includes: Formatting the GWT RPC data into readable and correlate-able content, addition of more data such as object field names and simple parameterization.
    Additional important updates for support include 64-bit recording in Vugen (very important), .NET 4.0 support, WCF application support enhancements, and IPV6 support.

    Also find more details:
     
     

    Saturday 16 June 2012

    General Load Runner Concept

    General: How does LoadRunner license work?

    LoadRunner requires license to function. The license entitles what protocol the user is permitted to run, the number of Vusers (or concurrent users it can generate) and the type of monitors available to the user.
    After LR8.1 FP3, the license model have changed from individual or group protocols to Bundle
    Licenses. In a Bundled License, the protocols of the same type are grouped together (e.g. Web
    (HTTP/HTML), FTP, Winsock are grouped together into Web & Multimedia Bundle). This (in my opinion) provides a neater way to manage the licenses.


    The license effectively constraints the Controller in the type of Vusers to run, the number of Vusers to run and the type of monitors entitled. As such, you can still install Vugen and Analysis to perform recording/replaying and analysis of the graphs without worrying about the license implications.

    The license is usually bounded by a Host-ID which generates the License Key for the machine. Take note that if you change system values like System Date, this will create a security violation to the license causing it to fail when you startup Controller. If such things arises, it's advisable to contact Mercury/HP for an unlocking license.

    The Host-ID changes everytime, however be assure that the license generated remains the same. This as described in KB 30252 is beacause the Host-ID is based on an algorithm to calculate the value out based on system values. That is why, changes such as the System Date may cause the Host-ID to be inconsistent with the License Key.

    You can find more details using below link:
    http://www.jds.net.au/tech-tips/loadrunner-licensing/

     

    Step Download Timeout

    Step Download Timeout means that the step needed to performed for the subsequent step to be performed have reached its timeout limit (default is 120 secs) in LoadRunner.
    Having mentioned the above, there are situations we must take note when this error occur. If the error occurs during the generation of the script (replay in Vugen), it could mean that the application is really taking time of more than 120 secs to complete the download of the resources. You may want to configure the timing to suit your application needs.

    If the error occurs during a scenario execution and happens in the middle of the scenario (usually with a large amount of load), the application is handling alot of load and unable to attend to all the vuser request, thus (maybe) taking more than the configured download timing. For this, it will be better advisable to look at the system utilization of the servers to seeth out any performance problems.

    To determine the initial problem, we can ask the following questions.

    1. Does the error occur in Vugen?
    2. Does the error occur in Controller?
    3. If yes for (2), does it occur in the start of the scenario run or in the middle of the
    scenario run?
    4. If yes for (2), what is the amount of running users when the error occur?

    The above, can scope down to the area of problem and allow you to determine your next course of action.

    If you have decided that the Step Download Time needs to be configured, you can configure that in the Runtime Settings of the script.
     
    Final note, its best to determine the characteristics of your application before applying the configuration. (Do not configure to suit the load test but rather let the load test determine the configuration)

    Script working fine in Vugen but get failed in Controller for more than 1 user

    Problem:
    Script working fine in vugen for 1 user and multiple iteration but it get failed for more than 1 user in Controller.

    Solution:
    1. Check the web_url for which it get failed  user. and try to record with other option like explicit_url and then run through controller. You may get succeed.

    Wednesday 13 June 2012

    How to download LoadRunner tool through HP site

    This article is about to download LoadRunner11.0 from HP site when you have proper SAID

    To download the installation you go to the following link:
    http://support.openview.hp.com/ (make sure u are logged in)
    1.       After you load the link go to >>Downloads
    2.       >>Software updates window button
    3.       My Updates
    4.       To make sure you see the same options like me we will go the other way around and enter your SAID directly
    5.       Fill the checkbox where you accept the terms and conditions
    6.       Click View Available Products >>
    7.       Under Performance Center you can find HP LoadRunner 11.00 Eng SW E-Media check the box and click the Get Software button on the bottom of the page.
    8.       Now you should see it on top of the table so under Deliverables click again Get Software.
    9.       Now you can see in the second window one .zip and one .z01 of LoadRunner.
    1.     Pick one of them and Download it (Directly or via HP Download Manager)

    Tuesday 12 June 2012

    Load Runner with VMWare

    HP recommendation about LoadRunner on VMWare

    LoadRunner 11 supports VMware ESX 4.0 on Windows XP, 2003 and Vista.
    It is not recommended to run Load Generator for load testing purposes on Virtual Environment, however it shouldn’t be a problem.
    Don’t need to install any patches to be able to run it on VM but always recommend installing the latest patches (currently patch 4).

    Monday 4 June 2012

    How to raise a Case to HP

    Steps to add SAID(Support Agreement ID):

    2.       Enter your HP Passport username and password (if you don’t have one, Kindly register a new user)
    3.       Add this SAIDs “10123456740” at bottom of the page.

    Once you have added the contract to your profile, you can open a support case. Kindly follow these steps to open a support case:
    2.       Click “Submit a new case” on the left.
    3.       Select “Quality Center” for Product field.
    4.       Select the Product version, Sub-product, Operating System, SAID, Severity
    5.       Click “Next”
    6.       Enter Case title and Case details
    7.       Click “Next
    8.       Click “Submit Case


    How to download Software from HP Site:



    Sunday 3 June 2012

    How Unique with Each iteration and Abort Vusers works in Parameter file


    When a File parameter is unique, LoadRunner will divide the data evenly into blocks and assign each block to a virtual user when it starts running. Each vuser will use the data in their assigned block sequentially.

    This means that the used values aren’t all at the start of the file; they appear in chunks, spread evenly throughout the file (unless your scenario has a single virtual user).

    Size of block depends on the "Automatically allocate block size" and "Allocate ____values for each Vusers."If we select first "Automatically allocate block size" it allocates data in 1 block= no of iterations.

    Example:
    Itreation=1
    User=3
    Data: 1,2,3,.......20 =total 20

    Then 20/3=6.66. Then Data will divide in block of 6 and last 2 data will not assign to any user.

     1 user: 1,2...6
     2 user= 7,8.....12,
     3 user= 13,14....18.

    19 and 20 will not pickup by any user.

    Note: Above divide is applicable only there is some run duration. If run duration is " Run until completetion" then data divide is not applicable.


    Unique/Once: Each vuser will use the data in sequentially. This means that the used values are all at the start of the file. No matter if run duration is "Run until completetion" OR have some duration.

    Example:
    User=3
    Data: 1,2,3,.......20 =total 20

     1 user: 1,
     2 user= 2
     3 user= 3

    User=3
    iteration=2
    Data: 1,2,3,.......20 =total 20

     1 user: 1,1
     2 user= 2,2
     3 user= 3,3

    Saturday 2 June 2012

    Can QTP and LR be installed on the same machine

    Can QTP and LR be installed on the same machine

    QTP and LR share some files. Therefore, if QTP is installed and then LR is installed, this will cause problems. QTP and LR can be installed on the same machine, but special attention has to be given to the install squence.

    LR needs to be installed first, then QTP can be installed.

    If you plan to execute QTP scripts, QTP should be installed on Load Generator computer.

    One QTP script be executed on one computer?
    How does QTP work? It takes full control on GUI desktop of computer. Each computer has one desktop only.
    That's why there is a limitation: you can run one QTP script per computer!

    To run QTP script from LoadRunner you have to have "GUI" Vuser LoadRunner license.

    The steps are:
    1. Record and save QTP script.
    2. Start LoadRunner Controller.
      Note, that QTP scripts can be executed in LoadRunner Controller. You cannot use LoadRunner Generator to run or debug QTP script.
    3. Select 'New Scenario...'.
      'New Scenario' dlg will be opened. Do not forget to select 'Quick Test Tests' from combobox:
    4. Open QTP script.
      Note, that 'Quantity' field will contain value '1', i.e. one user will be run:
      That's funny, LoadRunner set correct 'Quantity' value in Scenario Groups settings, but it forgot to set correct values in Scenario Schedule section:
      It seems like a small bug :)
    5. Execute scenario.
      You will find that your QTP script works - it will be starting a browser, performing search, clicking 'Next' btn and closing browser during 5 minutes (default time from Global Schedule settings)

      Congratulation! QTP script runs from LoadRunner.



     
    How to execute QTP script from LoadRunner?

    How to set the system’s TEMP and TMP directories


    Windows limitation of maximum path length on the temporary directory of Performance Center load generator

    Problem
    When running VuGen scripts in Performance Center and the following error appears:
    "Error: The user files were not transferred to the local load generator."
    Cause
    The controller cannot transfer the script files to the Load Generator.
    When running a scenario in LoadRunner Controller / Performance Center, the Controller transfers the Vugen script files to the temporary location on the Load Generators. The temporary location will be created under <the load generator’s temporary directory>\<brr folder>\netdir\<Path to the results folder on the controller>\<results name>.

    For example, if the script in Controller is stored in c:\VugenScript\Script1 and the Load Generator has the temporary folder set to C:\Documents and Settings\Default User\Local Settings\Temp, the Load Generator would save this script file in C:\Documents and Settings\Default User\Local Settings\Temp\<brr folder>\netdir\c\VugenScript\Script1.

    This is caused by a limitation of the maximum path length on Windows OS. The length limitation is 255 bytes in Windows XP and 260 bytes in Windows Vista. Please refer to MSDN: File Names, Paths, and Namespaces(http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx) for more details on this limitation.
    Fix
    On the Load Generator:
    A. If you are running the agent as a process, you can change the "TEMP" system Variable of the user from C:\Documents and Settings\Default User\Local Settings\Temp to C:\Temp.

    B. If you are running the agent as a service, you can change the service to use an account with Administration privileges, and change the admin account’s "TEMP" system variable to a shorter path:
    - Go to Start -> Control Panel -> Administrative Tools -> Services.
    - Look for the LoadRunner / Performance Center Agent Service.
    - Right-click and select Properties->Log On, changing this from "Local System account" to "This account", supplying the Administrative account username and password.
    - To change the admin user temporary location is described below:

    How to set the system’s TEMP and TMP directories

    Changing the system’s temporary directories
    To create a temporary directory:
    1. Bring up Windows Explorer, find a drive that has sufficient space.
    2. If TEMP folder does not exits, create a directory called "TEMP" in the root location of the drive.
    Example: C:\TEMP
    To add/change the temporary environemnt:
    1. For Windows 2000 or Windows XP machine:
    a. Right-click on the ‘My Computer’ icon on the desktop and select ‘Properties’.
    b. Go to the Advanced tab and click on the ‘Environmental Variables’ button.
    c. There are two sections listed: User Variables and System Variables. Under each section, you should see a variable for TEMP and TMP.
    d. Double-click on these entries, and modify the location to the temporary environment created above.
    Example:
    Change from C:\Documents and Settings\<user>\Local Settings\Temp
    Change to C:\TEMP
    e. Click <Apply>.
    2. For Windows NT machine:
    a. Right-click on the ‘My Computer’ icon on the desktop and select ‘Properties’.
    b. Go to the ‘Environmental’ tab.
    c. There are two sections listed: User Variables and System Variables. Under each section, you should see a variable for TEMP and TMP.
    d. Double-click on these entries, and modify the location to the temporary environment created above.
    Example:
    Change from C:\Documents and Settings\<user>\Local Settings\Temp
    Change to C:\TEMP
    e. Click <Apply>.

    VuGen hangs when trying to create parameters

    VuGen hangs when trying to create parameters
    When trying to create a new parameter in VuGen, the CPU utilization for VuGen.exe goes up to 100% and stays there eventually causing VuGen to crash.
    Diagnosis: The ss32x25.ocx file was not registered on the machine.

    Solution
    Register the ss32x25.ocx file on the VuGen machine.
    1. Check if ss32x25.ocx exists in C:\WINNT\system32 or C:\windows\system32 where it is copied to during the LR/VuGen installation.
    2. Check the version of the .ocx file, and confirm it is 2.5.0.20.
    Note:
    If the file is not present or the version is a lower one, copy it from a working LoadRunner machine, or, it can be found in the LoadRunner installation DVD, under this folder:
    lrunner\MSI\setup_j\register
    3. Register the ss32x25.ocx file using regsvr32.
    Use the regsvr32 command to register or unregister a DLL

    To register a DLL or OCX file
    Method 1:
    1. Open a DOS window.
    2. Navigate to the DLL’s or OCX’s directory.
    3. Enter regsvr32.exe <filename>.<dll/ocx>
    Example:
    regsvr32.exe mylibrary.dll
    Method 2:
    1. Go to Start -> Run and enter regsvr32.
    2. Open Windows Explorer and find the file.
    3. Drag the file from the Windows Explorer window into the Run dialog window. This will enter the full path to the DLL or OCX file.
    4. Click <OK>
    Example:
    regsvr32.exe "c:program filesMercurymylibrary.dll"

    To unregister a DLL or OCX file
    Method 1:
    1. Open a DOS window.
    2. Navigate to the DLL’s or the OCX’s directory.
    3. Enter regsvr32.exe /u <filename>.<dll/ocx>
    Example:
    regsvr32.exe /u mylibrary.dll
    Method 2:
    1. Go to Start -> Run and enter regsvr32 /u.
    2. Open Windows Explorer and find the file.
    3. Drag the file from the Windows Explorer window into the Run dialog window. This will enter the full path to the DLL or OCX file.
    4. Click <OK>

    How to automatically record web_reg_find for webpage titles

    Recording web_reg_find for webpage titles
    You can enable this option from Tools -> Recording Options -> Advanced tab, where it creates additional two new checkboxes.

    1. Generate the web_reg_find function for webpage titles.
    This will record a web_reg_find() statement with the title of the first (recorded) page of the request.
    2. Generate the web_reg_find function for subframes.
    This will record will a web_reg_find() statement for subframes.

    The defaults for the above settings are not selected. You need to select the settings so that VuGen can automatically record the web_reg_find function.

    Good practices for creating scripts in VuGen

    In order to have a vugen script properly created, is necessary to ensure no errors or warnings are present, there are few other steps to complete to be able to consider that the script is properly developed.

    Solution
    This is a recommended checklist of the steps that should be complete for a script creation.
    Note that this checklist has some items that only apply to web-based scripts and is optional to follow,

    * All values that should be correlated have been correlated.
    * Text checks (using web_reg_find) have been added before each web_url and web_submit_data function.
    * ContentCheck Rules have been added for all known error messages.
    * All server requests (web_url, web_submit_data) are being measured with a transaction (lr_start_transaction, lr_end_transaction, lr_set_transaction).
    * Script runs without causing errors, and any warnings are due to legitimate reasons (e.g. download filters).
    * File-based parameters have the correct “select next row” and “update value on” settings.
    * Correct runtime settings have been set. This means:
    o Action blocks have been weighted with correct percentages in Run Logic.
    o Pacing intervals have been set to the correct value that will achieve target throughput with the given number of vusers.
    o Full logging has been disabled, and size of “send messages only when an error occurs” lgo cache has been increased.
    o Think time set to replay as a random percentage, and think time values in script are not ridiculously large. No think time inside transactions.
    o Any needed download filters have been set.
    o All other runtime settings have been set as per internal standards.



    How can we make assure that all requests and responses are captured by loadrunner while recording?

    You can use fiddler or any other web debug tools like http analyzer, charles proxy etc. and navigate the flow and save fiddler logs.

    Record the same flow using Vugen and compare the requests in Vugen with Fiddler logs any thing extra in fiddler can be added in Vugen as request.
     
    IMPORTANT - Make sure you clear the browser cache before executing the flow on fiddler and Vugen as the request entry would be skipped in Vugen if request is fetched from Browser cache.

    Controller shows error executing scripts with large parameter files

    When running an scenario the following message comes
    Error: Exception was raised when calling event-notify Vuser function in extension parameng.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION
    The error doesn’t come from vugen.
    Cause
    Controller doesn’t support parameter files larger than 20 megs.
    Fix
    Contact support and request the private patch created for this problem for LoadRunner 9.5.2, For LoadRunner 11 the issue is resolved on patch 4.

    Debugging steps for issues about Virtual User Generator (VuGen)

    If VuGen crashes intermediately or shows abnormal behavior, verify/try the following:

    Try to login to the machine as a local administrator

    Try to log in as a local administrator rather than user who is currently logged in. If this helps resolve the issue of VuGen crashing this would indicate that the cause of the problem is privileges of this particular user who is logged in. Check with your System Administrator on what privileges can/cannot be added to this user.

    Make sure that there are sufficient Disk Space

    Make sure that you have enough disk space available on the VuGen. If the machine does not have enough disk space, it can cause problem.

    Try to recreate the VuGen’s initialization file

    Sometimes, the initialization files can become corrupted (e.g. after a crashed). You will have problem in launching or using the VuGen after that. Use the following steps to do delete the initialization file so that a new copy will be created:
    1. Shut the VuGen.
    2. Navigate to the C:Winnt ( or C:Windows for Windows XP machine )
    3. Delete the file named vugen.ini.

    Check the temporary environment variables

    Unlike the earlier window’s versions, Window 2000 and Window XP have the default environment set to c:Document and Settings<user-name>Local SettingsTemp instead of c:Windowstemp. This long path with a space can cause several problems on LoadRunner. To resolve the issue, change to a directory without empty spaces.

    Verify the MDAC version

    Make sure that you have MDAC 2.6 or higher installed.
    Check the version of the MSADCO.DLL file:
    1. Browse to C:\Program Files\Common Files\System\MSADC
    2. Riight click on the MSADCO.DLL Choose Properties
    3. Click the Version tabThe File Name Version will indicate what version you are using.

      NOTE: You can right click on any of the .DLL files in the MSADC directory and they should all display the same version information.

    Reboot

    When programs crash, they leave the system in an unstable state. This can cause many other problems that seem to have no apparent reason for happening or has not happened before. When the system is rebooted, it resets the system into a more stable state. This should be done after any program crashes.

    Shut down all unnecessary processes

    Some programs are designed to have certain DLLs "hook" or be loaded into another program’s memory space. Normally, this should not have any effect on the application itself. However, it can interfere with some programs and cause them to behave erratically or crash.
    For such, it would be recommended to shut down all processes that are not necessary, regardless if they hook into LoadRunner or not. Any programs that run as an icon in the system tray or on the taskbar are the first candidates for termination. Also, you can look through the list of processes in the Task Manager (right-click on the taskbar and select "Task Manager"). Some processes are system processes, which may not be able to be shut off, but any processes that can be shut down should be.

    Disable anti-virus software

    It is known that anti-virus software is intrusive when they are set to look for viruses. However, in searching for viruses, the software can interfere with a program’s proper execution. This could cause problems and sometimes crashes. This is why, for debugging purposes, we would recommend turning off the anti-virus software.
    The icon for the anti-virus software resides in the system tray (where the clock is located). Normally, you should be able to right-click on the icon and select "disable." However, some setups do not allow a user to turn off the anti-virus software. It is recommended to speak to a system administrator to get the anti-virus program disabled for a short period for debugging the problem.

    Reinstall

    In case that all the above steps fail, the only recourse left would be to try to uninstall LoadRunner. It is possible that either a previous version of LoadRunner was on the machine before the current installation or that the installation did not go properly although the installation did not give any errors. It is recommended that a full uninstall be done in this case. The following steps are for a full uninstall:
    1. Make sure that, all running LoadRunner processes (including the Controller, VuGen, Analysis and the Remote Command Launcher (for 6.x) or the LoadRunner Agent Process/Service (for 7.x) are closed.
    2. Backup any existing scripts that may have been saved in the LoadRunner installation folder (The scripts are sometimes saved in a ‘scripts’ subdirectory under the LoadRunner installation folder.).
    3. Run the uninstall program from the LoadRunner program group (or) use the Windows add/remove programs from the Control Panel. If any prompt is given about removing shared files, remove all the shared dlls that are reported as no longer being in use. In the very rare instance this causes a problem for some other application it may be necessary to re-install that other app. This is not generally a problem because every application should have registered which DLLs it needs to run.
    4. Reboot the machine after the Uninstall wizard is complete. This will complete the basic uninstall procedure.
    5. Delete all LoadRunner Folders. (Including the ones in the startup menu for Remote Command Launcher (LoadRunner 6.x) or Agent Process (LoadRunner 7.x)

    7. Do a search for the following files and remove them from all locations — they will be replaced during the re-install.
    a. wlrun.*
    b. vugen.*

    8. Bring up the registry editor: (Start à Run à regedit).

    9. Delete the following keys:
    a. Only for LoadRunner 6.x
    HKEY_LOCAL_MACHINESOFTWAREBORLAND
    b. If Load Runner is the only Mercury Interactive product on this machine, then delete
    HKEY_LOCAL_MACHINESOFTWAREMercury Interactive.
    HKEY_CURRENT_USERSOFTWAREMercury Interactive.
    c. Else delete
    HKEY_LOCAL_MACHINESOFTWAREMercury InteractiveLoadRunner.
    HKEY_CURRENT_USERSOFTWAREMercury InteractiveLoadRunner.

    10. Empty the Recycle-bin.
    After you remove these items, you can re-install LoadRunner. Also, make sure that you do not have any anti-virus programs running while you are installing LoadRunner. That has been known to cause some problems with the installation of LoadRunner.
    NOTE: Reinstallation should only be done for the following certain circumstances.
    1. The crash only happens on a particular machine.
    2. Some feature that was previously working is now crashing.
    3. The above options were tried before hand.

    Vugen Not Recording — Internet Explorer (iexplore.exe) “Hangs” when launched during recording

    Vugen Not Recording — Internet Explorer (iexplore.exe) "Hangs" when launched during recording
    When recording WEB (HTTP/HTML) script Vugen launches iexplore.exe but Internet Explorer window is not displayed.
    This may occur due to COM object permissions.
    Change the following Recording Options setting:
    "Recording Options" -> General ->"Script": UN-CHECK "Track processes created as COM local servers"
    Then record the WEB (HTTP/HTML) script.

    Other solution are:
    • Check your loadrunner software is compatible with the current version of Internet Explorer.
    • Close all the browsers before you record any application.
    • Completely disable the DEP from windows.
    • Do you have all the administrative privileges if not atleast try to use “Run as Administrator” if you are using windows 7 or any new version.
    • Have you installed antivirus in your system. Some DLL files might be stopping the vugen to open the browser.If possible disable the antivirus completely for some time.
    •  Still not working, it’s time to repair loadrunner or uninstall loadrunner and install it again.
    • If it is still not working time to contact  HP Support.
    •  

    The recorded application becomes unresponsive during the recording


    This could be caused by VuGen’s recording mechanism not being able to connect to the application’s server. Network connection errors can be seen in the Recording Log:

    [Net An. Warning (1068:197c)] Request Connection: Remote Server @ 123.123.123.123 - 5222 (Service=) Failed attempt #1. Unable to connect to remote server: rc = -1 , le = 10060) [Net An. Warning (1068:197c)] Request Connection: Remote Server @ 123.123.123.123 - 5222 (Service=) Failed attempt #2. Unable to connect to remote server: rc = -1 , le = 10060)




    Note: the Recording log is in the ‘Output’ pane. Make sure ‘Recording’ is selected in the combo-box on the left:





    In order to fix this problem, the Port mapping for the specific IP and port should be added to the Port Mapping dialog (under the Record > Recording Options… menu), and the entry should be unchecked. That will ensure that the above IP and port are not recorded – that application simply connects to them without any LoadRunner involvement. For the messages above the correct setting would be:





    This workaround can be done in case the communication to 123.123.123.123:5222 is not important for the business process and can be omitted. If that’s not the case, the same entry should still be added, but left as checked. That will ensure correct traffic capture to this address.


    No events are being recorded in Load runner scripting

    Here are the most common reasons why no events are showing in the script:

    The events counter keeps increasing, while the generated script is empty

    This may be because VuGen’s recording mechanism fails to identify HTTP data. To fix it, ensure that your application indeed uses HTTP Web traffic. If the application uses SSL connections, make sure you choose the correct SSL version (SSL 2, SSL 3, TLS) through the Port Mapping dialog, available by clicking the ‘Options…’ button on the Record > Recording Options… dialog:



    The Advanced Port Mapping Settings dialog opens when you click ‘Options…’:



    The events counter shows less than five events, while the application keeps getting data from the server

    In this case, VuGen’s recording mechanism fails to capture any network activity at all. Ensure that your application really does provide some network traffic, ie. it sends and receives data through the IP network. If an antivirus program is running, turn it off during recording. Check the recording log for any clues about the recording failure. Messages such as “connection failure” or “connection not trapped” can be a sign of the wrongly configured Port Mapping settings.

    In addition, if you are recording on a Chrome or Firefox browser, make sure that all the instances of the browser are closed prior to the recording.


    Specific events are not recorded in load runner scripting,why?

    This is problem could be caused by the event being dropped as “uninteresting”. By default, VuGen’s Web (HTTP/HTML)protocol records client requests that return an HTTP response status of 2xx or 302, and discards all other requests. If a missing request returns a response that was discarded, such as 301, you can make a modification to the registry to instruct VuGen to generate a command for it:

    Locate the following registry key:
    [HKEY_CURRENT_USER\Software\Mercury Interactive\Networking\Multi Settings\QTWeb\Recording]
    Add the following string value to it:
    "GenerateApiFuncForCustomHttpStatus"="301"

       

    How to Change Password of IUSR_METRO Account

    Sometime we need to change the password of IUSR_METRO Account. This may be required due to compliance issue. Below are the steps to chang...