All About the Apps
Showing results for 
Search instead for 
Do you mean 

HP LoadRunner: Where do I start? (VuGen)

Michael-Deady ‎10-03-2012 10:00 AM - edited ‎09-18-2015 03:57 PM


Part 5 – Testing Evolution Series:


How long have you been load testing? Is there anything you have taken for granted over time? For those of us users of HP LoadRunner (LR) or HP Performance Center (PC)  that have been load testing so long some of us just take a lot of the VuGen scripting tool functionality for granted. I decided to get recertified recently as a way to help others in load testing while also retraining myself on the tool.


One of the funniest things about getting re-certified is watching an experienced load tester act like an old man or women when it comes to the part of the test entitled, “what’s new with LoadRunner”. You’ll start to hear things like “back in my day” or “I can remember when." I’d like to think myself as an equal opportunity person, and I’d like to take the opportunity to pick on a newbie to the Load testing profession. A while back I trained a good friend on LoadRunner. He walked up to me one day and said, “Hey Michael, I'd like to ask some questions about this scripting tool VooGen”. From that moment on I can’t help but think of LoadRunner as some type of taboo tool. After all, when running LoadRunner on UNIX you have to create daemons before it starts running. When starting with HP LoadRunner there are a couple of items to you to get familiar with:


  1. Understand the HP LoadRunner main components
  2. Which protocol to pick?
  3. Leverage the step-by-step guide: Instructional task bar


  1. Understand the HP LoadRunner main components


VuGen (Virtual User generator): In order to simulate transactions, it is necessary to create scripts for it. The HP LoadRunner scripting tool is called VuGen. It enables you to record and edit a variety of user transactions, each suited to a particular load testing environment or topology. This results in a specific type of user script. This component also allows the user to insert:

  • Checkpoints, checks the response from the server or application to confirm that your test performed the actions correctly.
  •  Transaction timing, represents an action or a set of actions that you are interested in measuring
  •  Parameters, are often used when the application needs unique data, data dependency, data cache, or date constraint.

Controller and Load Generator: Once transactions are ready to be simulated, you will need to create the user scenarios and execute them. The user scenarios will simulate the users’ behavior within the application. For example:


The component to execute the transactions based on users’ behavior is called the controller. Using the controller, you can control all the virtual users (known as Vuser) in a scenario from a single workstation. This tool will execute your test, and after the run collects all the information you will need for later analysis. The controller distributes each Vuser in the scenario to a load generator (some time called a host or the work horse). The load generator is the machine that executes the Vuser script. Most of the Vuser operate as a single thread process, enabling a single server or computer to emulate the actions of if several 100 users.


The controller includes monitoring and it is integrated with Sitesope (HP monitoring solution) and HP Diagnostics (profiler solution). I will talk more about these solutions in future blogs.


Analysis: To view a detailed summary from the results after test execution, you can use one or more of the analysis tools which take the Vuser logs and create a detailed report of a single run or can compare executions of the same test.


2.  Protocols?


Protocols Acts as a communication medium between a client and an application under test (AUT). When selecting one of LoadRunner current 51 protocols you should understand that application behavior may drastically change based on the protocol you select, which in turn may give faults or questionable results. 


  • One way to learn which protocol to use is to use the Protocol Advisor located under the file menu. This will help you determine an appropriate protocol for recording a Vuser script.

*Note: the Protocol Advisor tool is only a reference tool. My suggestion is to always run the tool several times before deciding on a single protocol.


  • An older school type of discovery tool is to use the Winsock protocol for the first recording if the protocol is unknown. I only recommend Winsock protocol for very simple scripts or as the discovery tool to find the proper protocol for the application under test (AUT). Winsock records at the basic system instruction level, which can help discern the proper protocol needed to record you scripts going forward. This method also allows you to see how the application is operating on the shell level. I.e. what port ranges are being used or protocol combinations.  


  • When learning what protocols are needed for the application under test, please make sure you check it against what protocols your company owns. 

           i. An example of this: Let’s say your company owns 500 licenses of Web and Multimedia protocol but you recorded your scripts with web 2.0 protocol to execute the test.


If you had realized this early in the game, you could have saved time and energy.  You need to understand that you can only record the test in the protocols your company owns. With that in mind, please keep reading this article, which may give you hints on the ability to use another protocol or tools to complete load testing on AUT. (Here in Texas, we have an old saying, "There is more than one way to skin a cat" or for the vegetarian reading this, “There are several ways to peel a potato”)


3.       Use the step-by-step guide: Instructional task bar


For the first few times working with a new application, I would highly recommend using the instructional task bar found on the left-hand side of the screen. This step-by-step guide will aid your work with the application and accomplish the goals of successful load testing. The task screen acts as scripting wizard for the four key steps of load testing which will make your script stable and reusable.  See the steps below:


  • Recording – if the tool is setup to record correctly, VuGen will automatically open your application as well as a floating toolbar and begin recording your actions. Then you perform the desired business processes you want to record.  I would highly recommend that while recording, use the toolbar to insert transactions, rendezvous points (which instruct a script to wait during test execution for multiple scripts to arrive at a certain point, in order that they may simultaneously perform a task), and comments whenever possible. In addition, remember to put natural pauses in your scripts; this allows VuGen to automatically insert think times into the script.


  • Running Replay – helps you to uncover any errors or issues that need to be addressed such as dynamic values, which need parameterization. It also provides valuable data for the correlation process which is used to handle dynamic content.


  • Enhancements Step – allow the scripter to take the information learned in the replay step and aid you inserting parameters and check points. These will help you troubleshoot any questionable function found between the first and second run. This Correlation process will resolve the dynamic value into a variable thereby enabling your script to replay successfully.


  • Preparing for a Load Test step – will help in preparing your script to be added to the Load Test scenario.

We have just scratched the surface of LoadRunner and scripting tool VuGen (VooGen). With the next several Blog’s I would like to step through the process and applications that make up the LoadRunner Suite of Tools. We will also start discussion around types of Load testing which should start windfall of exchange of ideas. I would like the senior citizens of load testing start posting more tips and tricks on VuGen on this blog while the youth of Load testing post their questions, suggestion and idea on this blog as well.




Other Blogs you may like:

About the Author


Michael Deady is a Pr. Consultant & Solution Architect for Teksystems, center on quality, aimed at client's satisfaction, and long-term success. Perceived by clients, peers, and supervisors as a leader with the proven ability to lead development and quality assurance teams through software-development life cycle phases, to ensure quality of new products. He specializes in software development, testing, and security. He also loves science fiction movies and anything to do with Texas.

on ‎10-23-2012 11:08 AM

When I run the script in VuGen i do not get any error as unauthorized.
Also I do not get any failed transaction in controller when i run the scenario of 100Vusers.
But when I generate the report in Analysis Summary we have  http 401 response

Please Help!!

‎10-23-2012 12:20 PM - edited ‎10-23-2012 12:26 PM

I take from your question your test using one of the web base protocols,  I be happy to help if you could document the version of PC or LR your using and could you tell me if you have already run correlation process. The other thing's I like to know

  • ·         Is ever script running and getting the same error on every run or it just some of them?
  • ·         Is the summary report, reporting that the web site your testing is getting 401 errors or is the error when you generating the report?
  • ·         When replaying your script did you turn-on, "Show runtime viewer during replay"
  • ·         Could you include a snap shot or the report is self?
  • ·         Have you already opened a ticket with support and if so could you please send me the number so I can look it up.
  • ·         What type authentication process is your system be requesting
  • ·         Have you ran the script on each of the generators using VuGen or manually
  • ·         Do you have all the proper credentials and security setting on all generator?  
  • ·         Have you included any check points in your script
  • ·         Have you included the web_set_user() command, if this is secure site Generator may be seen as a unauthorized user.
  • ·         If the system is requesting account to authenticate are you using the same one for all one hundred?  

Off the top of my head, I would think that you may have some setup issue on the generators not being setup with same permission as the box you wrote script on. Most the time the LR will pick up authentication error the same way it pick up 404 errors unless the checkpoints are showing up before the error or the web_url checks have been removed? Either way I recommend connecting with HP Support       

on ‎08-05-2013 08:58 AM

why we create vugen?

similarly we can create thread and same task we perform

27 Feb - 2 March 2017
Barcelona | Fira Gran Via
Mobile World Congress 2017
Hewlett Packard Enterprise at Mobile World Congress 2017, Barcelona | Fira Gran Via Location: Hall 3, Booth 3E11
Read more
Each Month in 2017
Software Expert Days - 2017
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all