You use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen records the actions that you perform during the recording session, recording only the activity between the client and the server.
During recording, VuGen monitors the client and traces all the requests sent to and received from the server.
After the recording, VuGen generates various functions that define the actions performed during the recording session. VuGen inserts these functions into the VuGen editor to create a basic Vuser script.
Instead of having to manually program the application's API function calls to the server, VuGen automatically generates functions that model and emulate real world situations.
VuGen not only records Vuser scripts, but also replays them. Replaying scripts from VuGen is useful for debugging. It enables you to determine how a Vuser script will run when it is executed as part of a larger test.
During playback, Vuser scripts communicate directly with the server by executing calls to the server API functions. When a Vuser communicates directly with a server, system resources are not required for the client interface. This lets you run a large number of Vusers simultaneously on a single workstation, and enables you to use only a few testing machines to emulate large server loads.
In addition, since Vuser scripts do not rely on client software, you can use Vusers to check server performance even before the user interface of the client software has been fully developed.
To effectively use the Vuser scripts, you add them to a scenario using the LoadRunner Controller. While running the Vusers, you gather information about the system's response. Afterwards, you can view this information with the Analysis tool. For example, you can observe how a server behaved when one hundred Vusers simultaneously withdrew cash from a bank's ATM.
VuGen records Vuser scripts on Windows platforms only. However, a recorded Vuser script can be run on both Windows and Linux platforms.
You can also program Vuser scripts in your native programming application such as MS Visual Studio. To access the LoadRunner API, install the appropriate IDE add-in provided on the LoadRunner DVD.
LoadRunner supports several Vuser types:
|Protocol Based Vusers||
LoadRunner supports various types of Vusers using the most common protocols. Each type is designed to handle different aspects of today's system architectures. You can create a Vuser script using a single protocol or multiple ones.
For a complete list of the available Vuser protocols, see Vuser Protocols.
|Unit Test Based Vusers||
LoadRunner supports unit tests in the form of .dll or .jar/.class files, created in Microsoft Visual Studio or Eclipse.
To create these tests, install the appropriate IDE for Developer add-in, available in the Additional Components folder of the LoadRunner DVD.
LoadRunner can integrate functional testing scripts in the form of GUI tests into a load testing scenario. You create GUI tests using HP Functional Testing software - QuickTest or Unified Functional Testing.
You can only run a single GUI Vuser on a Windows-based load generator. Use Citrix to run multiple GUI Vusers. For additional information on Windows-based GUI Vusers, see Using Unified Functional Testing Tests in LoadRunner.