Venkat Matta

it's all about the Performance Testing

HP Vugen

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 typically recorded in a Vuser script. The primary tool for creating Vuser scripts is the Virtual User Generator, VuGen.

VuGen not only records Vuser scripts, but also runs them. Running scripts from VuGen is useful for debugging. It enables you to emulate how a Vuser script will run when executed as part of a larger test.

When you record a Vuser script, VuGen generates various functions that define the actions that you perform during the recording session. VuGen inserts these functions into the VuGen editor to create a basic Vuser script.

VuGen records Vuser scripts on Windows platforms only. However, a recorded Vuser script can be run on both Windows and Linux platforms.

Vuser Types

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.

Unit Test Based Vusers

LoadRunner supports unit tests in the form of .dll or .java/.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

GUI Vusers

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 run only 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

Vuser Protocols

VuGen enables you to record a variety of protocols, each suited to a particular load testing environment or topology and results in a specific type of Vuser script. For example, you can use a Web HTTP/HTML Vuser Script to emulate users operating Web browsers. You can use FTP Vusers to emulate an FTP session. The various Vuser technologies can be used alone or together, to create effective load tests.

The following table lists the available Vuser protocols, and a brief description of each protocol.

Note: In the LoadRunner documentation, the terms Vuser protocols and Vuser types are used interchangeably.

Protocol Description
Ajax
(Click & Script)
An acronym for Asynchronous JavaScript and XML. Ajax (Click & Script) uses asynchronous HTTP requests, allowing Web pages to request small bits of information instead of whole pages.
C Vuser
A generic virtual user which uses the standard C library.
Citrix ICA
A remote access tool, allowing users to run specific applications on external machines.
COM/DCOM
Component Object Model (COM) – a technology for developing reusable software components.
DB2 CLI
The IBM Call Level SQL Interface to the DB2 family of databases.

Note: This protocol has been deprecated.

(DNS)
Domain Name Resolution
The DNS protocol is a low-level protocol that allows you to emulate the actions of a user working against a DNS server.
The DNS protocol emulates a user accessing a Domain Name Server to resolve a host name with its IP address. Only replay is supported for this protocol—you need to manually add the functions to your script.
EJB
(Enterprise Java Beans)
Enterprise Java Beans – an architecture for the development and deployment of Java-server components.
Flex
Flex is an application development solution for creating Rich Internet Applications (RIAs) within the enterprise and across the Web. Action Message Format (AMF), is a Macromedia proprietary protocol that allows Flash Remoting binary data to be exchanged between a Flash application and an application server over HTTP.
FTP
(File Transfer Protocol )
File Transfer Protocol – a system which transfers files from one location to another over a network.
The FTP protocol is a low-level protocol that allows you to emulate the actions of a user working against an FTP server.
i-mode
NTT DoCoMo’s technology for accessing the Internet on a mobile phone system.

Note: This protocol has been deprecated.

Informix
An IBM Informix database using a standard client/server architecture.

Note: This protocol has been deprecated.

IMAP
(Internet Messaging)
Internet Message Application – a protocol which enables clients to read email from a mail server.
Java over HTTP
Designed to record java-based applications and applets. It produces a Java language script using web functions. This protocol is distinguished from other Java protocols in that it can record and replay Java remote calls over HTTP.
Java Record Replay
Common Java recorder.
Java Vuser
Java programming language with protocol level support.
Javascript Vuser
A scripting language used to develop Internet applications.
LDAP
(Listing Directory Service)
An Internet protocol designed to allow email applications to look up contact information from a server.
MAPI
(Microsoft Exchange)
Messaging Application Programming Interface designed to allow applications to send and receive email messages.
MMS
(Media Player)
Streaming data from a media server using Microsoft’s MMS protocol.
Important: In order to replay Media Player functions, you must place a file called wmload.asf on the Windows Media server machine. The VuGen machine must be able to access using mms://<servername>/wmload.asf. This ASF file can be any media file renamed to wmload.asf.
MMS (Multimedia Messaging Service)
A messaging service used for sending MMS messages between mobile devices.
Mobile Application – HTTP/HTML Enables the recording of mobile native applications.
.NET
Supports the recording of Microsoft .NET client-server technologies.
MS SQL Server
Microsoft’s SQL Server using the Dblib interface.
Note that this protocol has been deprecated.
ODBC
Open Database Connectivity – a protocol providing a common interface for accessing databases.
Oracle – 2 Tier
Oracle database using a standard 2-tier client/server architecture.
Oracle NCA
Oracle 3-tier architecture database consisting of Java client, Web server and database.
Oracle Web Applications 11i
The Oracle Applications interface that performs actions over the Web. This Vuser type detects actions on both the Mercury API and Javascript levels.
Peoplesoft Enterprise
An Enterprise Resource Planning system based on the PeopleSoft 8 enterprise tools.
Peoplesoft- Tuxedo
An Enterprise Resource Planning system based on the Tuxedo Transaction Processing Monitor, including automatic correlation.
POP3
(Post Office Protocol)
A protocol designed to allow single computers to retrieve email from a mail server.
Real
A protocol used to transfer streaming data from a media server.
Note that this protocol has been deprecated.
RDP
(Remote Desktop Protocol)
A remote access tool using the Microsoft Remote Desktop Connection to run applications on an external machine.
RTE
(Remote Terminal Emulator)
Emulation of users who submit input to, and receive output from, character-based applications.
SAP (Click & Script)
Emulation of communication between a browser and SAP server on a GUI or user-action level.
SAP GUI
An Enterprise Resource Planning system to integrate key business and management processes using the SAP GUI client for Windows.
SAP – Web
An Enterprise Resource Planning system to integrate key business and management processes using the SAP Portal or Workplace clients.
Siebel – Web
A Customer Relationship Management Application.
Silverlight
A protocol for Silverlight based applications emulating user activity at the transport level. Allows generating high level scripts by automatically importing and configuring WSDL files used by the application.
SMTP (Simple Mail Protocol)
Simple Mail Transfer Protocol – a system for distributing mail to a particular machine.
Sybase Ctlib
A client/server architecture database called via the Ctlib interface.
Note that this protocol has been deprecated.
Sybase Dblib
A client/server architecture database called via the Dblib interface.
Note that this protocol has been deprecated.
TruClient – Ajax
An advanced protocol for modern JavaScript based applications (including Ajax) emulating user activity within a web browser. Scripts are developed interactively in Mozilla Firefox or Internet Explorer.
TruClient – Ajax – Mobile
Enables the recording of mobile browser based applications using the TruClient Ajax technology.
Tuxedo
Tuxedo Transaction Processing Monitors.
VB Vuser
Note that this protocol has been deprecated.
VBScript Vuser
Visual Basic Scripting Edition language – used for programming documents displayed in Web browsers.
WAP
Wireless Application Protocol – used for Web-based, wireless communication between mobile devices and content providers.
Note that this protocol has been deprecated.
Web (Click & Script)
Emulation of communication between a browser and Web server on a GUI or user-action level.
Web (HTTP/HTML)
Emulation of communication between a browser and Web server on an HTTP or HTML level.
Web Services
Web Services are a programmatic interface for applications to communicate with one another over the World Wide Web.
Windows Sockets
The standard network programming interface for the Windows platform.

VuGen Layouts – Overview

The VuGen window is composed of a number of zones. Each zone can contain a variety of panes, such as the Errors pane or the Snapshots pane. The panes appear as tabs within the zones. The figure below shows a zone that contains four tabbed panes: Output, Tasks, Errors, and Run Time Data. The Output pane is currently visible.

debug_pane_with_tabs_and elipse

The specific configuration of the zones and the panes contained within the zones is called a layout. VuGen is supplied with a set of standard layouts: Default, Debug, Plain, Record, Replay, and Snapshot. Each layout is designed to enhance a specific phase of the Vuser script development process. For example, the Replay layout includes the panes that are most useful when you run a Vuser script: Errors, Call Stack, Watch, Breakpoints, Output, and Run Time Data. VuGen automatically uses specific layouts during specific phases of the script development process. For example, the Record layout is used while you record a script, and the Replay layout is used when you replay a script.

The VuGen toolbar displays the layout that is currently used: . To change the layout, click the Layout drop down and select the required layout from the list of layouts, as shown below.

layout_dropdown_open

Modifying a layout

You cannot add or delete a standard layout. However, you can modify most of VuGen’s standard layouts to meet your specific requirements. When you modify a layout, you can add, move and resize zones, select which panes to include in each zone, and specify which of these panes is displayed by default. For task related details, see How to Modify the VuGen Layout. After you modify a standard layout, VuGen maintains that layout until you change the layout again or reset the default layouts.

Solution Explorer – Overview

The Solution Explorer enables you to easily organize and navigate through script entities, enhancing the recording, replay and debug process. You can create a solution containing multiple scripts of different protocols related to a full-cycle business process. Each script entity includes extra files (such as header files), run-time settings, parameters, and replay runs.

The following graphic illustrates the Solution Explorer structure:

SolutionDiagCombined.png

Solution

When you create a new script, you can name the solution that contains the script. For example, you can use the business process as the solution name. If you do not specify a name, the default name is “Untitled”.

Scripts

Your solution can contain multiple scripts. Single-click a script, or one of its assets, to change focus to that script. When a script in a solution is in focus, it changes the behavior of VuGen. For example, when you click replay, the script in focus runs. In addition, menus options, toolbars buttons, and panes display functionality relevant to the script’s protocol. For example, the script in focus is recorded in Web HTTP/HTML , the Recording Options button is displayed on the toolbar. However, if the script in focus is recorded in Ajax TruClient, the Develop Script button is displayed on the toolbar.

Double-click the script’s action to open it in the Editor.

In addition, you can drag and drop scripts (<scriptName>.usr) from the file directory to the Solution Explorer.

Extra files

Additional files that are called by the script, are contained in the Extra Files node under Solution Explorer > <ScriptName>. You can drag and drop header files (<headerFileName.h>from your file directory. When you include files in the Extra Files node, these files will automatically be included in a Load Generation Scenario.

The information contained in extra files can include:

  • Common utility functions used by the script (for example, code)
  • Definition of constants and variables used by the script (for example, code)
  • Special assets used during script execution (such as .jpeg files)
  • Data files manipulated by script code during script execution

The following are examples of file types that can be added as extra files:

.ws,.h,.c.,dat,.ini,.vbs,.java,.js,.txt,.tux,.rec,.msc,.vdf,.xml,.xsl,.dtd,.html,.htm

You can edit extra files in the editor if the file type is included in Tools > Options > Script Management > List of file types that can be edited in the Editor. Double click the extra file to open it in the Editor. For details on how to modify the list,

Run-time Settings

You can access run-time settings for a specific script from the Run-time Settings node in the Solution Explorer > <Script> > Run-Time Settings. For details, see Run-Time Settings.

Parameters

You can access parameters for a specific script from the Parameters node in the Solution Explorer > <Script> > Parameters.

Replay Runs

This node enables you to access the Replay Summary Reports for each iteration in the replay

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 )

Facebook photo

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

Connecting to %s

Information

This entry was posted on March 22, 2016 by in Loadrunner.
%d bloggers like this: