How to increase scripting productivity in HP LoadRunner?

Many of us do scripting in testing tools such as HP LoadRunner, Apache JMeter, HP UFT (formerly known as QTP), and Excel VBA etc. Everyone has their own scripting style and their own customized layouts in IDE. In this blog post, I would like to share my way of scripting which will expedite your scripting process in HP LoadRunner. If you have any great productivity improvements, please do share in the comments section.

Before I start, I expect you to customize the IDE in HP LoadRunner; I am using the latest version of HP LoadRunner in my laptop. Below is my IDE which helps me to code quicker.

LoadRunner IDE
LoadRunner IDE

If you notice above IDE, I have minimized Solution Explorer and adjusted the Steps Toolbox and Output pane. I usually use shortcuts to open parameter file (Ctrl + L), Runtime settings (F+ L), Runtime settings (F4), Recording Options (Ctrl + F7) etc. To create/rename actions, I prefer File menu. I hardly use Solution Explorer. I always keep Steps Toolbox open and I use it very frequently than F1 key.

How to increase scripting productivity in HP LoadRunner?

How Steps Toolbox expedites the scripting?

Steps Toolbox is a great utility which will expedite your scripting pacing for beginners and intermediate performance engineers. E.g. if you want to insert think time, you directly write lr_think_time(5); while typing you use Ctrl + Space bar for Intellisense which will complete the function name.

Assume that you need to use few advance functions like web_reg_save_param_ex(); or web_reg_save_regex(); or web_reg_async_attributes();

For beginners or intermediate, initial hiccups will be there to remember the parameters and the exact syntax. I agree that F1 key helps you to know more about the function and its syntax. But I prefer Steps Toolbox if you already aware about the function which you are going to use.

Assume that you need to use web_reg_save_param_ex(); function, just type the first few alphabets as shown below. Steps Toolbox will list out the function those are matching with the alphabets.

Steps Toolbox
Steps Toolbox

Click and hold on web_reg_save_param_ex and drag and drop it to the line in which you want to add the function as shown below.

Steps Toolbox Dialog Box
Steps Toolbox Dialog Box

LoadRunner pop-ups one dialog box with the parameters for that web_reg_save_param_ex(); function. You just need to enter the details and click on OK.

Functions Parameter
Functions Parameter

In the action, you can see the function and its parameters details as shown below.

    web_reg_save_param_ex(
“ParamName=C_SessionID“,
“LB=viewstate=\””,
“RB=\”>”,
“NotFound=warning“,
“Ordinal=1“,
SEARCH_FILTERS,
“Scope=BODY“,
“IgnoreRedirections=Yes“,
“RequestUrl=www.mysiteapplication.com“,
“ContentType=xml“,
LAST);

Likewise, you can just type the few characters, drag and drop it to the action, and fill the parameters. You can add complex functions in just three steps which will expedite your scripting effort.

Extra Tip:

To encrypt the text in LoadRunner quickly, select the text, right click and select Encrypt String.

Encrypt String
Encrypt String

Your password will get encrypted immediately as shown below

web_set_user(“hello”,lr_decrypt(“56148bbdab9f10e7bd22d3c4f8″),”rip:80”);

About the Author

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hamster - Launch JMeter Recent Test Plans SwiftlyDownload for free
+
Share via
Copy link