Skip to main content

Posts

lr_set_debug_message function in loadrunner with examples

Lr_set_debug_message – One of my favorite lr function in loadrunner. It is mainly useful when we are unable to find correlation value in a particular request.
We usually use Extended log -> Data Returned by Server in Run-time Settings to get all the response in replay log. Sometimes the vugen will crash or becomes slow as the vugen is writing all the response to replay log.
If it crashes or taking long time to execute the script then it’s better to use lr_set_debug_message instead of using Data Returned by Server.
In the following example we have added data returned by server only to particular request.
Example:

lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_FULL_TRACE,LR_SWITCH_ON);
web_url("Bing",
"URL=http://www.bing.com/",
"Mode=HTML",
LAST);
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_FULL_TRACELR_SWITCH_OFF);


lr_set_debug_message can also be written in the following way:

Declare in globals the following way and call wherever …

Loadrunner Download and Installation - Its Easy and Quick

The above video helps you to install Loadrunner software in your computer. If you are not able to download and install. Leave a comment below, I will help you to download and install the software.
Sometimes, the file may corrupt during the software download. Use HP Download Manager to download properly. You can find HP Downloader during the download time.

The new version of Loadrunner 12 has been released into the market. Download from here.

Once you click on the download link. HP will ask for your e-mail and your personal details. once it is done it will take you to download page. Here we have three components.
HP Loadrunner 12 Community Edition Additional ComponentsHP Loadrunner 12 Community EditionHP Loadrunner Tutorial Click on the second link. First it will download HP Download Manager. Once you install HP Download Manager. It will download the Loadrunner 12. You can also download the additional components from the first link.


Once you download the Loadrunner from the above link.…

Controller and its use in Loadrunner Software You Must Know

You can control and create the various scenarios of Loadrunner with the help of Controller—a powerful LoadRunner's tool. The events occurring in the course of each testing session is referred to as a scenario. Scenarios are effective in controlling the number of users and their various actions along with the machines that act as platforms for running their emulations. They are used to create load tests sessions that are required for checking the strength and reliability of your servers.
Given below is a list of primary items that need to be defined in your scenarios: Type of scenario-manual or goal oriented.Tests to run- the Loadrunner unit tests or scripts required to run.The machines upon which these tests will be run. The number of Vusers (virtual users) required to run on every machine.Scheduling-which is linked to the ways of loading the Vusers.Measurements that require monitoring during the test runs. When the Controller is opened for the first time, it will prompt you to pu…

VuGen and Vuser Mechanism in HP LoadRunner Software

Vusers or Virtual users are the virtual counterpart of live human business application testers. A recorded set of activities by the Vuser is turned into a Vuser script which will is commonly used for testing business applications.
A Vuser Script is generated by an HP tool, VuGen which is also known as a Virtual User Generator. The VuGen is able to derive an entire Vuser script through documentation of a live business process in a specific application. While a business process is done, the VuGen records such activity, sorting only those that directly involve client and server interaction. This recording by the VuGen is an automatic process which copies the actual process of the business in the real world. The process is actually digital rather than doing the process manually.
The Virtual User Generator looks into the activities like client requests that were both sent and received by the server. 
When a playback is performed, the Vuser script directs a call to the server API commencing th…

How to check the duration of transaction in the middle of execution in vugen?

You can check the duration of transaction in middle of the execution in vugen by using the following method.
For example, in the middle of the execution the user wants to check the response time of a transaction. If the user found that the response time is more than 10 seconds the user wants to stop the transaction else continue with the execution of the script.
This can be achieved using lr_stop_transaction and lr_resume transaction.
lr_stop_transaction function will not end a transaction but it stops the timing of a transaction. It is useful for validating purposes. You can include a conditional statement after calling the stop function as shown in the below example.
Example: Start transaction.Google.com request Sent.Stop transaction(lr_stop_transaction).Take the duration of the transaction.If it is more than 10 seconds stop the transaction.Else.Continue with the transaction(lr_resume_transaction).Script Example:
Action() {     double  dur;     lr_start_transaction("GoogleHo…

lr_start_transaction Usage and Dynamic Transactions Generating withExamples

Why do you use lr_start_transaction?
It is mainly used to check the response time of a particular request. Enter google.com or bing.com, how much time Google or Bing has taken to load the page.
How to use lr_start_transaction?
lr_start_transaction to be inserted before beginning of a request/transaction, which you need to analyse the request/transaction. Lr_start_transaction and lr_end_transaction are inserted before and after the request. Each lr_start_transaction must have corresponding lr_end_transaction, otherwise vugen will consider as illegal statement.
Note: Do not use period(.) in transaction names. Period indicates end of transaction in vugen and analysis.
In this following example, lr_start_transaction starts a transaction whose purpose is to measure the response time of loadrunnerz.com. (How much time it take to load a page).
Example:
lr_start_transaction(Loadrunnerz_Home_Page); web_url("Loadrunnerz", "URL=http://www.loadrunnerz.com/", "TargetFrame=&…