Skip to main content

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.

  • Start transaction.
  • 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:

     double  dur;

     LAST );

     dur = lr_get_transaction_duration("GoogleHomePage");

 if (dur>10)
     lr_log_message("Response time of this transaction is", dur); 
     lr_end_transaction("GoogleHomePage", LR_AUTO);


     lr_log_message("Response time of this transaction is %f", dur); 
     lr_end_transaction("GoogleHomePage", LR_AUTO);

 return 0;


Popular posts from this blog

NeoLoad Interview Questions and Answers

Here are some of the interview questions and answers on NeoLoad:
What is NeoLoad?
NeoLoad is a performance testing tool designed to test different types of web, standalone and mobile applications.
What is the difference between Loadrunner, JMeter and NeoLoad?
Click here for differences
What are the different counters you monitor in NeoLoad?
Average Response Time(requests), average response time(pages), average requests/s, average throughput, current response time(requests), current response time(pages), current requests, current throughput, current users count, controller cpu load, controller memory load etc.
What are the different type of tools you can integrate with NeoLoad?
App Dynamics, CA APM Integration, Dyna trace integration, HP ALM or Quality Center Integration, Java and Jamo Solutions M-eux Test Integration, Jenkins Integration, perfecto mobile integration, selenium integration.
What are the different type of Operating systems you can monitor?
Linux Monitor, Solaris Monitor, AIX …

File operations in loadrunner with examples

In this post I will explain how to capture a value from server response and save to a text file using vugen.
How to capture and save to text file using loadrunner:
First I have recorded the script using and then i searched for IBM. We will get 10 results. I have captured all the 10 values and saved to a file.
Here is the code for that.

Sitescope Monitoring Tool Features and Monitors

Why Sitescope is called Agentless Monitoring Tool?
HP SiteScope monitors the application/infrastructure/server/operating system without installing any agent software on the system to be monitored. This feature makes the installation, usage and maintenance of Sitescope simpler when compared with the any performance monitoring tools like Diagnostics.
Sitescope Monitors:
Sitescope has also upgraded and changed drastically to meet the rapidly changing technologies and environments like virtualization and cloud computing. Using Sitescope we can monitor different web servers, application servers and database servers. We can also monitor operating systems Windows, Linux, Sun Solaris, IBM AIX. It has more than 100 monitors including Weblogic, Websphere, SAP, SIEBEL, SNMP, LDAP, Network Monitor etc. HP SiteScope can also monitor cpu utilization, response time, disk space, and resource availability of a variety of host types and application platforms.
Sitescope Features:
SiteScope provides failover …