Skip to main content

lr_continue_on_error function and its usage in Loadrunner

In Vugen if an error is detected the vugen automatically stops the execution. But sometimes the script need to be continued even if the script fails. This can be achieved in the following way.

By using  Run-Tiime Settings:

Go to Vuser -> Run Time Settings -> Miscellaneous.

In Miscellaneous go to Error Handling and select Continue on Error. These setting applies to all the script including vuser_init and vuser_end.

By Using  lr_continue_on_error:

By using lr_continue_on_error function we can include a portion of the script instead of whole script. We need to enclose the requests that we are getting error in between lr_continue_on_error(1) and lr_continue_on_error(0)
lr_continue_on_error(1); web_url("Google", "URL=http://www.google.com/", "TargetFrame=", "TargetBrowser=Google ", "Resource=0", "RecContentType=text/html", "Snapshot=t1.inf", "Mode=HTML", LAST ); lr_continue_on_error(0);
Controller Settings:

The way in which Loadrunner executes continue on error is different from protocol to protocol. For web protocol when the error comes it jumps to the next iteration when continue on error is turned off and for other protocols like DBA and ORACLE_NCA the vuser jumps to the vuser_end section and terminates the execution and it will not continue to the next iteration.

There are situation where we need to maintain constant load on the server. In this situation when the vuser terminates because of some error in the controller. We have two options.
  1. Select the goal oriented scenario and select the number of vusers to be maintained as scenario goal. This will make sure that a vuser is added to the scenario as soon as the vuser is terminated because of some error.
  2. If vuser is failed in manual scenario. The failed Vusers can be restarted from the vuser window in the controller.

Comments

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 bing.com 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 …