Home > Performance Test > Performance Testing With Load Runner -4- : Working with LoadRunner (creating&recording scripts)

Performance Testing With Load Runner -4- : Working with LoadRunner (creating&recording scripts)

Working with LoadRunner

When testing or monitoring an environment, you need to emulate the true behavior of users on your system. HP testing tools emulate an environment in which users concurrently work on, or access your system. To do this emulation, the human was replaced with a virtual user, or a Vuser. The actions that a Vuser performs are described in a Vuser script. The primary tool for creating Vuser scripts is the Virtual User Generator, VuGen.

Vusers emulate the actions of human users by performing typical business processes in your application. The actions that a Vuser performs during the recording session are described in a Vuser script.

Using VuGen, you can run scripts as standalone tests. Running scripts from VuGen is useful for debugging as it enables you to see how a Vuser will behave and which enhancements need to be made.

Steps for Creating Scripts:

VuGen enables you to record a variety of Vuser types, each suited to a particular load testing environment or topology. When you open a new test, VuGen displays a complete list of the supported protocols.

Image
This window opens up as soon as you open the VuGen. You can select the protocol of you application and click ok. For most of the web application its Web (HTTP/HTML) Protocol

Open VuGen

To start VuGen, choose Start > Programs > <App_Name> (for example LoadRunner) > Applications > Virtual User Generator from the Start menu.

To open an existing script, not in the recent list, click Open Existing Script. To create a new script using a recent protocol, click the protocol in the Recently used protocols list.

To create a new script in a protocol that is not listed, click New Vuser Script.

Choose File > Zip Operations > Import From Zip File … to open an existing Script from a zip archive.

Image

Now click on the New Protocol Script and you will see the following Window. From this window you have to choose the protocol on which the application you are going to load test works.

VuGen provides a variety of Vuser technologies that allow you to emulate your system. Each technology is suited to a particular architecture and results in a specific type of Vuser script. For example, you use Web Vuser Scripts to emulate users operating Web browsers. You use FTP Vusers to emulate an FTP session. The various Vuser technologies can be used alone or together, to create effective load tests or Business Process Monitor profiles.

Image

Now set the General options for VuGen.

For Example To set the environment-related options:
Select Tools > General Options and click the Environment tab.

To save the current script information for auto recovery, select the Save AutoRecover Information option and specify the time in minutes between the saves.

To set the editor font, click Select Font. The Font dialog box opens. Select the desired font, style, and size and click OK. Note that only fixed size fonts (Courier, Lucida Console, FixedSys, and so on) are available.

To use a comparison tool other than WDiff, select Use custom comparison tool and then specify or browse for the desired tool.

Click OK to accept the settings and close the General Options dialog box.

Now Set the Recording Options for recording the user actions of the application under load test.

Image

Image

Now that you are ready for recording Click on the record button

Image

Give the Url of the application that needs to be load tested like the one below

Image

The following table describes the criteria for determining the business functions or processes to be included while recording 

Image

Now record the transaction in either Vuser_init or Vuser_end or action by using the recording tool bar.

Image

Once the recording is over a recording log is also generated

To view a log of the messages that were issued during recording, click the Recording Log tab. You can set the level of detail for this log in the advanced tab of the Recording options.

Now the script will be generated for the recorded user actions and will be displayed like this 

Image

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: