SAP Loadrunner (VuGen) from HP – a primer

SAP Loadrunner (VuGen) from HP – a primer

In a project implementation, it is recommended to perform stress tests, volume tests and performance tests. These tests check the performance of the system when multiple users perform transactions and generate vast amounts of data. It can help estimate the sizing of the server. System performance issues are typically encountered in period-end processing when large number of users have to post / process data within a small timeframe. Scheduled jobs that process data within SAP and that receive data from external systems also place stress on the system performance.

SAP Loadrunner from HP is an application that enables organizations to test the performance, stress/ volume of the SAP system to be deployed. If these tests were to be performed manually, it would require a large number of users generating data simultaneously. Loadrunner creates virtual users to simulate real users; and tests the system. As a test tool, it is integrated with HP Quality Center.

Based on previously defined Business Processes/ scenarios, the test team can create test scripts and scenarios using Loadrunner’s Virtual User generator (VuGen). These are then executed into the SAP server using Loadrunner Controller. The Controller will eventually generate reports and analysis of the system performance.

This blog looks at the Loadrunner from a functional perspective only; and hence is restricted to Loadrunner VuGen. Managing the Controller is a skilled task requiring a technical resource to manage and execute the tasks in the Controller.

Loadrunner VuGen is easy to use and understand.  It is useful to have some knowledge on JAVA; however some of the  simple changes to the code can be made without any knowledge of programming languages. It is a useful tool that integrates with HQ Quality Center and eventually SAP Solution Manager. In my  opinion, all these products are in mid-stages of maturity. Project expectation is for a tool (or multiple but integrated set of tools) that documents the business process, defines test requirements, allows automated testing, logs results against the requirements and Business Process. Unfortunately, the products (SAP Loadrunner, HP QC, SAP Solution Manager) are still a few versions away from fulfilling expectation. Each product performs part of the expectation and there is a lot of duplication of data between the three products. Considering that HP and SAP are closely aligned in product development, I would expect an integrated  product available soon in the future.

A typical Loadrunner team and their role would be:

  • Business Analysts – Define scenarios that require performance testing
  • Functional Analysts – create scripts for these scenarios
  • Loadrunner consultants – Execute scripts and scenarios; generate results; report results
  • SAP Technical Team – Analyse results from Loadrunner; Engage in remedial measures, if needed
  • Process / Project Leads – Approval for testing methodology; Lay down expected results of testing

Planning for Loadrunner tasks

Some of the questions to ask before start of Loadrunner tasks are:

  • How many scripts and scenarios do we need to execute?
  • What processes would represent a reasonable test of performance and volume?
  • How many users should be assigned to each script?
  • What is the current / expected volume to be tested?
  • Do you have a clone of the production system to test the loads?

The tasks to be performed in Loadrunner VuGen are as below:

I created a script for transaction code FB01 (FI Journal entry) as below.

Record a script

To record a script, log into SAP using the SAPGUI protocol on Loadrunner. Loadrunner will capture the screen data in form of a script as the functional analyst creates data against the transaction.

Once the recording is complete, Loadrunner will generate a script. There are three sections in the script:

  • vuser_init: this will record the login details to the SAP server
  • Actions: will record the activity in the transaction. You could create multiple actions to record multiple transactions or split a transaction to multiple actions; and
  • vuser_end: this will record the logout process from the SAP server


Replay the script

Once the script is recorded, replay the script to ensure it can create the data as expected. The replay creates a log that explains whether the script can be succesfully executed or not.



Edit the script

Insert Parameters

When the script is being recorded, it logs the actual data that was used to record the script (for example, the GL account number that the functional analyst typed in during the recording). It is a good idea to parameterise the data. This will allow Loadrunner execution for multiple set of data. The data to be used in performance testing can then be stored in a data file that will be read by Loadrunner.

Insert Transactions

Transaction will measure the performance of the server; it records the time it takes the server to respond to a request. Typically, you could mark transaction on a complex report generation.

Insert Rendezvous Points

This measures the user load on the system. When a virtual user reaches the marked Rendezvous Point, it waits till all other virtual users with Rendezvous Points arrive, and then all VUsers are released simultaneously.

Insert Think time

If, in a productive system, the user pauses before executing successive actions, you can insert User Think Time into the script to simulate that.

Create scenarios

Assign scripts to scenarios; this will allow an end-to-end process scenario to be executed over multiple scripts.

Load script to HP Quality Center (QC)

Loadrunner allows you to log to, and load the scripts to HP QC.

This process should be repeated for each transaction that has to be performance tested. Multiple transactions can be recorded as part of one script by creating multiple “action” points in the scripts. While recording the script in SAP, in the Loadrunner screen “recording” overwrite “Action” with “Action1”; the next transaction with “Action2” and so on.

Loadrunner VuGen is easy to use; and automated testing in HP QC or stress testing in Loadrunner is much easier. If you have used SAP Loadrunner, do send me your comments on how you used it and what was your experience with it.

A detailed presentation with some more screenshots is here.



Rajesh has implemented HP Loadrunner for SAP in an SAP IT implementation environment. Rajesh has 12 years experience implementing SAP / IT / BPM Finance solutions for several customers globally; he also has 7 years experience working in the business in Finance and Accounting functions. His business process knowledge combined with his IT expertise enables him to provide his customers with best-of-breed advise on business process / IT implementations.

View Rajesh Shanbhag's profile on LinkedIn


Leave a Reply

CommentLuv badge