Replay and load test SAP GUI scripts
This topic describe prerequisites for replaying SAP GUI scripts, and tips for running SAP GUI scripts in a LoadRunner Professional scenario.
Replace the masked password in the sapgui_logon function generated during recording, with the real password. It is the second argument of the function, after the following user name
sapgui_logon("user", "pswd", "800", "EN");
For additional security, you can mask the password within the code. Right-click in the password text (the actual text, not *****) and select Mask String. VuGen inserts an lr_unmask function at the location of the password as follows:
sapgui_logon("user", lr_unmask("3ea037b758"), "800", "EN");
Display SAP GUI during replay (optional)
When running a script for the first time, configure VuGen to show the SAP GUI user interface during replay, in order to see the operations being performed through the UI. Select Replay > Runtime Settings > SAPGUI > General node and select Show SAP Client During Replay. During a load scenario, disable this option, since it uses a large amount of system resources in displaying the UI for multiple Vusers.
Load test settings
When working with a LoadRunner Controller scenario, set the following values when running your script in a load test configuration:
-
Ramp-up. One by one (to insure proper logon) in the Scheduler.
-
Think time. Random think time in the runtime settings.
LoadRunner Agent run mode
The LoadRunner Professional or LoadRunner Enterprise remote agent must be run in process mode to replay SAP GUI scripts. For details, see LoadRunner Agent processes in the LoadRunner Professional Help Center.
Terminal Sessions
Machines running SAP GUI Vusers may be limited in the number of Vusers that can run, due to the graphic resources available to that machine. To increase the number of Vusers per machine, open additional terminal server sessions on the Load Generator machines. For details, see LoadRunner Terminal Services Manager in the LoadRunner Professional Help Center.