+ All Categories
Home > Documents > 99178450 Performance Testing Tips

99178450 Performance Testing Tips

Date post: 03-Apr-2018
Category:
Upload: jenadebisankar
View: 219 times
Download: 0 times
Share this document with a friend
13
Action files in Loadrunner The requests which agents on host machines issue to application servers are specified by a playback of actions created by the Vuser User Generator (VuGen.exe). LoadRunner creates new scripts with three sections:  vuser_init: Most of the initiation operations are done with vuser_init action. We need to execute login only once if we are simulating shift duration. Here login related operations needs to be recorded. Since the bank executives login only once in their shift.  Action: All other bank executive repeated operations needs to be captured. And the login and logout operations should not be captured into action.  vuser_end:  Most of the closure operations are done with vuser_end action. Here logout related operations needs to be recorded. Since the bank executives logout only once after his / her shift.  Loadrunner Interview Questions - Part IV 1.How many types of Correlation are there?  Correlation can be done by 3 ways: 1. Manual Correlation ( this method is most recommended) 2. Automatic Correlation (This requires rules need to be created in existing rule engine, this can apply only to popular and frequent dynamic values like viewstates in .Net applications) 3. Correlation Studio 2.How you will do the manual Correlation? 1. Record two identical scripts with the same business process, make sure to use same input data like user names and search strings 2. Compare the scripts to identify the dynamic value, You can compare them using notepad or keeping side by side or using windiff or any text comparison tools. the mainly you have to look at ITEMDATA section and URL ending part. Once you identified which value is changing every time 3. Search for the dynamic values in the Generation log and Copy Left boundary (LB) and Right boundary (RB) into notepad 4. Replay the script with extended log and look for those boundaries in replay log and Double click in the replay log where the boundaries are found and it will take the cursor to the point where dynamic value is generating in the recorded script. Thi s step is to identify from which request this value is generating and this will help us to identify the location to keep web_reg_save_param function. 5. Insert web_reg_save_param("Param name", "LB=" , "RB=", LAST) ; where the cursor is pointing 6. Replace the dynamic values with Param name 3.How you will do the parameterization for Date/Time?  Select the parameter type as Date/Time and select the date/time format in the list. If you want u can get the date in the script by using "lr_save_datetime("Tomorrow is %B %d %Y", DATE_NOW + ONE_DAY, "next"); " 4.How many areas you can do the correlation? Areas of correlation are: 1) ItemData 2) TimeStamp 3) Links 4) Check Boxes 5) List Butoons 6) Radio Buttons 5.What is the function used for to find out the buffer size of file ?  First of all we have to know the application type for this question. If it is web application we dont need to go for buffer size bcoz most of the functions are inbuilt with the buffer element. If we go for windows sockets application the function is mentioned below: char *lrs_get_static_buffer( char *s_desc, char *buffer, int offset, int length, char *encoding ); 6.What is the difference between Hits/secs & Throughput?  Hits Per Second: This graph shows the number of HTTP requests made by Vusers to the Webserver during each second of the load test scenario run. Throughput:This graph shows the amount of throughput on the server during each second of the load test scenario run. Throughput is measured in bytes or megabytes and represents the amount of data that the Vusers received from the server at any given second. 7.How graph will be there between Hits/secs & Throughput? 
Transcript
Page 1: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 1/13

Action files in Loadrunner

The requests which agents on host machines issue to application servers are specified by a playback of actions created by the Vuser User

Generator (VuGen.exe). 

LoadRunner creates new scripts with three sections: 

vuser_init: Most of the initiation operations are done with vuser_init action. We need to execute login only once if we are simulating shift

duration. Here login related operations needs to be recorded. Since the bank executives login only once in their shift. 

Action: All other bank executive repeated operations needs to be captured. And the login and logout operations should not be captured intoaction. 

vuser_end: Most of the closure operations are done with vuser_end action. Here logout related operations needs to be recorded. Since the

bank executives logout only once after his / her shift. 

Loadrunner Interview Questions - Part IV 

1.How many types of Correlation are there? 

Correlation can be done by 3 ways:

1.  Manual Correlation ( this method is most recommended)

2.  Automatic Correlation (This requires rules need to be created in existing rule engine, this can apply only to popular and frequent

dynamic values like viewstates in .Net applications)

3.  Correlation Studio

2.How you will do the manual Correlation? 

1.  Record two identical scripts with the same business process, make sure to use same input data like user names and search strings

2.  Compare the scripts to identify the dynamic value, You can compare them using notepad or keeping side by side or using windiff or

any text comparison tools. the mainly you have to look at ITEMDATA section and URL ending part. Once you identified which value is

changing every time

3.  Search for the dynamic values in the Generation log and Copy Left boundary (LB) and Right boundary (RB) into notepad

4.  Replay the script with extended log and look for those boundaries in replay log and Double click in the replay log where

the boundaries are found and it will take the cursor to the point where dynamic value is generating in the recorded script. This step

is to identify from which request this value is generating and this will help us to identify the location to keep web_reg_save_param

function.

5.  Insert web_reg_save_param("Param name", "LB=" , "RB=", LAST) ; where the cursor is pointing

6.  Replace the dynamic values with Param name

3.How you will do the parameterization for Date/Time? 

Select the parameter type as Date/Time and select the date/time format in the list.

If you want u can get the date in the script by using "lr_save_datetime("Tomorrow is %B %d %Y", DATE_NOW + ONE_DAY, "next"); "

4.How many areas you can do the correlation? 

Areas of correlation are:

1) ItemData

2) TimeStamp

3) Links

4) Check Boxes

5) List Butoons

6) Radio Buttons

5.What is the function used for to find out the buffer size of file ? 

First of all we have to know the application type for this question.

If it is web application we dont need to go for buffer size bcoz most of the functions are inbuilt with the buffer element.

If we go for windows sockets application the function is mentioned below:

char *lrs_get_static_buffer( char *s_desc, char *buffer, int offset, int length, char *encoding );

6.What is the difference between Hits/secs & Throughput? 

Hits Per Second: This graph shows the number of HTTP requests made by Vusers to the Webserver during each second of the load test scenario

run.

Throughput:This graph shows the amount of throughput on the server during each second of the load test scenario run. Throughput is

measured in bytes or megabytes and represents the amount of data that the Vusers received from the server at any given second.

7.How graph will be there between Hits/secs & Throughput? 

Page 2: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 2/13

Hits per second is directly propositional to through put

If the Hits/secs Increses Throughput should also increase

if the Hits/sec decreases through put should also decrease

8.If suppose we are executing a scenario with 10 vusers and a value is parameterized (Say ex: Sales Id with 10values), how can i know that

what is the value of 5th vuser sales id? 

The question is having little information to answer, Question should also have which parameter properties this scenario is using. Let us go with

some examples. If the setting is sales id picked Sequential and update for each iteration. in the first iteration all the users will use first value, so

the answer is 5th iteration. If it is Unique the 5th sales id will the 5th user will take. To find 5th vuser value we have to know first what we havegive the parameter properties.

If we take sequential-->each iteration then in parameter values 5th value is 5th vuser value and if we take unique also same value and if we

take random we have to check in the log file of LRR folder.

9.What is the purpose of the Unique value? 

Assigns a unique sequential value to the parameter for each Vuser. Ensure that there is enough data in the table for all Vusers and their

iterations. Ifyou have 25 Vusers and you want to perform 4 iterations, your table must contain at least 100 unique values.

If you run out of unique values, VuGen behaves according to the option you select in the When run out of values field.

In real life applications, in lot of situations application will not accept duplicate values like order number, registration functionality.

10.In controller, when I am executing the scenario with 10vusers, among 10vusers 1 is failed then how you will find out who is the exact

user?

First of all enable the ip spoofing and insert "lr_get_vuser_ip()" then execute the scenario and take the log files saved in result directory(.LRR

extension) and find the failed user transaction then we can find vuser ip which is failed.

11.Is there any function in lr to avoid multiple login's if a user already logged in? 

There is no function to avoid multiple logins. In case if we have to avoid multiple login based on our application then we have to write our own

code in "C" language.

12.In controller I am executing a scenario with 2Vusers and a value is paramerterized ( Say ex: Sales with 10values). So, whether it is possible

to assign for each users 5 values? If yes how ? 

Go to parameter properties

Selext Next Row:Unique

Update each value on: Each occurence

then automatically radio button " Allocate ________ values for each vuser" will be enabeld

elow is the observation on Run time settings:

Think Time: Time delay between the user actions (Transactions)

Pacing: Time delay between the Iterations

Run Logic: number of iterations, This setting is applicable for both controller and Vugen.Eg: Vugen: 1 user, 1 iteration, 2 or 3 Iteration

In Controller : Running hourly based Test,

o  Duration - 60 - Run logic iteration count will not be considered

o  Run until completion - Run logic iterations will be considered

o  Vugen : Vuser menu -> Run time settings - Run logic

o  Controller : Select the script(group) - Right click - Open Run time settings

o  Controller Run time settings will take priority over Vugen Run time settings

Log:  Vugen: Extended log enable to debug the scripts.

In Controller : Disable log while running big load test or select Send messages only error occurs

Miscellaneous: Automatic Transactions: 

o  Define each Action as Transaction ( Default Action files: vuser_init, Action, Vuser_end) - Disable this option because we do not

response time for action blocks, we are more intrested each user action/transaction response time

o  Define each step as a Transactions - Disable this also because it will provide each and every step(Get request or Post request) response

time, rather than measuring response time each and every indivdual steps response time, it is recomednded to keep manualtransaction points lr_start_transaction and lr_end_transaction

More information about run time settings: 

Thread 

1) If you run each Vuser as a thread, the Controller launches only one instance of the driver program (such as mdrv.exe), for every 50 Vusers (by

default). This driver process/program launches several Vusers, each Vuser running as a thread. These threaded Vusers share segments of the

memory of the parent driver process. This eliminates the need for multiple re-loading of the driver program/process saves much memory

space, thereby enabling more Vusers to be run on a single load generator.

Page 3: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 3/13

2) The main advantage of a multi thread environment is the ability to run more Vusers per load generator.

3) Only thread safe protocols should be run as threads.

Process 

1) If you run each Vuser as a process, then the same driver program is launched (and loaded) into the memory again and again for every

instance of the Vuser. Loading the same driver program into memory uses up large amounts of RAM (random access memory) and other

system resources. This limits the numbers of Vusers that can be run on any load generator.

2) The protocols Sybase-Ctlib, Sybase-Dblib, Informix, Tuxedo, and PeopleSoft-Tuxedo are not thread safe, so need to run as process

Loadrunner Installation process:

  The format in the CD will be ISO format, extract it.

  Select full installation

  It will install Vugen, Controller, Analysis and Loadgeneretor.

  Generally you can go with custom installation as Controller is not required in our Laptop or Desktop.

  If you Install Controller, It will expire after 10 days. Controller is only the licnse component. So with out having license also we can

create scripts in Vugen

  As per Licensing Policy, If you buy a license, you should use that only for your products.

  Consulting firm can't buy loadrunner license to use it for it's clients.

Loadrunner Installation process:

  The format in the CD will be ISO format, extract it.  Select full installation

  It will install Vugen, Controller, Analysis and Loadgeneretor.

  Generally you can go with custom installation as Controller is not required in our Laptop or Desktop.

  If you Install Controller, It will expire after 10 days. Controller is only the licnse component. So with out having license also we can

create scripts in Vugen

  As per Licensing Policy, If you buy a license, you should use that only for your products.

  Consulting firm can't buy loadrunner license to use it for it's clients.

  Difference between Generation log and Replay log

   Generation log & Replay log: 

  Generation Log:

  Contains HTML source of recoded snapshots

  Replay log:

  Contains HTML source of Replay snapshots (Make sure to enable extended log in the runtime settings.

  Virtual user generator (VuGen) Recording options

  Virtual user generator (VuGen) Recording options 

   Difference between HTML-mode, URL-mode and GUI-mode recording 

   When you are starting to record a web application, you should be aware of the HTML-mode and URL-mode recording that a Web

(HTTP/HTML) protocol, we will just briefly talk about the differences (in general) and how it applies to your script.

   HTML-mode 

  HTML-mode recording is the default and recommended recording mode. It records HTML action in the context of the current Web

page (which means everything you see on the web page will be recorded in a single function).

   The advantage of this mode is that it generates a script that is intuitive to the reader in terms of what is the form requesting (in a

form of entire web page). Readers of the scripts will then be able to recognize each “logical” requests/call made to the server,

making amendments to the script easily.

   URL-mode 

  The URL-mode option instructs VuGen to record all requests and resources from the server. It automatically records every HTTP

resource as URL steps. This recording mode captures even non-HTML applications such as applets and non-browser applications.

 

Page 4: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 4/13

  The advantage of this mode is that it generates a script that has all known resources downloaded for your viewing. This works good

with non-HTML applications such as applets and non-browser applications (e.g. Win32 executables). But having everything together

creates another problem of overwhelming low-level information and making the script unintuitive.

   When there are unrecognizable requests made to the server in Web (HTTP/HTML) protocol, they are recorded as

web_custom_request. However, in URL-mode, this can be selected to allow recording to default to web_custom_request.

 GUI-mode 

  This is introduced with Web (Click & Script) protocol. The GUI-mode option instructs VuGen to record all editable fields in an object

or non-browser applications. What it does is to detect the fields that have been edited and generate the scripts accordingly. The

concept is similar to functional testing when objects are detected at the GUI-level. When reading the script, it allows easier reading

as the script is based on the GUI presented to the real user.

   Different modes of recording in LoadRunner 

 

 Loadrunner Vugen Scripting 

  Let us discuss about below message functions in VuGen:

   lr_output_message: Loadrunner output message functions sends output to replay log along with line number.

   lr_log_message: Loadrunner log message functions sends output to replay log but it will not display any line number.   lr_error_message: This is similar like output message but it will send error to output window and log file along with line number.

Correlation overview: 

  Correlation is the way handling dynamic values in client server communication.

  The values captured will be send back to server in later steps in the script.

  Correlation is typically used for handling session id's

Correlation Techniques: 

Manual correlation 

Automatic correlation. 

Pictorial view of how correlation works: 

  Below is the snapshot of recording and replaying with out applying: 

Page 5: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 5/13

 

  Below is the snapshot of recording and replaying after implementing correlation.

Steps for Manual correlation : 

1.  Record two identical scripts with the same business process

2.  Compare the scripts to identify the dynamic value

3.  Search for the dynamic values in the Generation log and Copy Left boundary (LB) and Right boundary (RB)4.  Replay the script with extended log and look for those boundaries in replay log

5.  Double click in the replay log where boundaries are found and it will take the cursor to the point where dynamic value is generating

in the recorded script.

6.  Insert web_reg_save_param("Param name", "LB=" , "RB=", LAST) ; where the cursor is pointing

7.  Replace the dynamic values with Param name

onitoring Unix performance from Loadrunner -controller 

Page 6: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 6/13

 

This can be achived through agent less monitoing, that means we don’t need to do any agent installation on the server but the machine

should have RSTAT daemon up and running. Controller communicates with port 111 on the Unix machine and this port is then mapped to the

dynamic port on which the rstatd is working. The controller then queries rstatd and all communication takes place through this established UDP

socket connection. 

  1. What does summary report contain in loadrunner analysis?  

  2. What are the worst transactions in summary report loadrunner analysis?  

  3. How does load runner gives the ranking of worst transactions in the summary report?  

  4. What does scenario behavior over time graph contain in loadrunner analysis?  

  5. What does running vuser graph contain in loadrunner analysis?  

  6. What does hits per second graph contain in loadrunner analysis?  

  7. What does throughput graph contain in loadrunner analysis?  

  8. How do you check the status of scenario SLAs by looking into the colors in loadrunner analysis?  

  9. What are the default graphs generated by load runner analysis?  

  10. What does vuser Summary graph contain in loadrunner analysis?  

  11. What does Rendezvous graph contain in loadrunner analysis?    12. What does transaction Summary graph contain in loadrunner analysis?  

  13. How to compute transactions per second in load testing?  

  14. What does transactions per second graph contain in loadrunner analysis?  

  15. How to compute total transactions per second? 

  16. What does total transactions per second graph contain in loadrunner analysis? 

  17. What does transactions performance summary graph contain in loadrunner analysis? 

  18. What does transaction response time under load graph contain in loadrunner analysis?  

  19. What does transaction response time percentile graph contain in loadrunner analysis? 

  20. What does transaction response time distribution graph contain in loadrunner analysis? 

  21. What does throughput MB graph contains in loadrunner analysis?  

  22. What does http status code summary graph contain in loadrunner analysis?  

  23. What does http responses per second graph contain in loadrunner analysis?  

  24. What does connections graph contain in loadrunner analysis?  

  25. What does connections per second graph contain in loadrunner analysis?  

  26. What does web page diagnostics graph contain in loadrunner analysis?  

  27. What are the diagnostics options are there in web page diagnostics graph in loadrunner analysis?  

  29. How do you diagnose the component over time in web page diagnostics graph in loadrunner analysis?  

  30. How do you diagnose the download over time in web page diagnostics graph in loadrunner analysis?  

  31. How do you diagnose the time to first buffer over time in web page diagnostics graph in loadrunner analysis?  

  32. What does page component breakdown graph contain in loadrunner analysis?  

  33. What does page component breakdown over time graph contain in loadrunner analysis?  

  34. What does page download time breakdown graph contain in loadrunner analysis?  

  35. What does page download time breakdown over time graph contain in loadrunner analysis?  

  36. What does time to first buffer breakdown graph contain in loadrunner analysis?  

 37. What does time to first buffer breakdown over time graph contain in loadrunner analysis?  

  38. What does downloaded component size graph contain in loadrunner analysis?  

  39. Why do you need to merge the graphs in loadrunner analysis? 

  40. How do you merge the graphs in loadrunner analysis? 

  41. What is the difference between overlay and tile graphs in loadrunner analysis? 

  42. Why do you auto correlate the graphs in loadrunner analysis?  

  43. How do you do root cause analysis in loadrunner analyzer? 

  44. What does auto correlate graph contain in loadrunner analysis?  

  45. What are the types of reports generated in loadrunner analysis?  

Page 7: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 7/13

  46. How do you analyze the worst transactions in loadrunner analysis?  

  47. What does Average Transaction Response Time graph contain in loadrunner analysis?  

Configure Step down time out? 

"Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s)

[MsgId: MERR-27728]” 

Tip:

Well, straight-forward. This is because it failed the 120 secs benchmark, an equivalent of 2 mins.

Imagine a normal application not responding within 2 minutes is serious where we are anticipating an

average respond time of 10 secs!. However, take note that if your application can respond more than

120 sec, then consider the next suggestion

Error -26377: No match found for the requested parameter " 

Tip:

This could be because of 

The generation of the parameter of LB and RB was incorrect during recording.The page may had

changed and the LB and RB no longer exists in the application. This can be due to changes in the page

design or application code.

Loadrunner to record Business processes in ECC5.0 to perform load test. This process requires upload of 

a document from my local machine every time I do the transactions to trigger a work flow. Without the

workflow the transaction does not write to the data base. Now the problem is that the LR recording

engine does not record the file upload process as it happens on the local machine inside a windows file

open box and there is no network communication happening. The protocol using is SAPGUI. 

Tip: 

In order to perform this, you need to use SAPGUI together with SAPWeb protocol. Loadrunner supports

multiple protocols within the same scripts.This will result in a script which performs both SAPGUI and

Web operations.

LR Agent Error: Process "lr_bridge.exe" was not created on remote host "" 

The issue:

Error: Process "lr_bridge.exe" was not created on remote host "". Reason: communication error.

Make sure the Agent process or service is running on the remote machine.. [MsgId: MERR-29987]

Page 8: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 8/13

 

Causes for the issue:

  LR Agent process or Service is not started on Load Generator 

  The port 54345 is not open in bidrectional

  No communication between LG and Controller 

Solutions:

  Make sure the LR agent is running or not , If its running as process change it to service

and vice versa

  Check the port 54345 is in listening mode or not by doing : type netstat -an in the

command prompt of the generator machine

  Check whether you are able to ping the remote generator machine from the controller 

machine and vice versa

Good Luck 

LR Agent Error: Process "lr_bridge.exe" was not created on remote host "" 

The issue:Error: Process "lr_bridge.exe" was not created on remote host "". Reason: communication error.

Make sure the Agent process or service is running on the remote machine.. [MsgId: MERR-

29987]

Causes for the issue:

  LR Agent process or Service is not started on Load Generator 

  The port 54345 is not open in bidrectional

   No communication between LG and Controller 

Solutions:

  Make sure the LR agent is running or not , If its running as process change it to service

and vice versa

  Check the port 54345 is in listening mode or not by doing : type netstat -an in the

command prompt of the generator machine

 Check whether you are able to ping the remote generator machine from the controller machine and vice versa

Good Luck 

Why Loadrunner does not launch Browser/Internet explorer at the time of script

recording? 

Page 9: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 9/13

When you start scripting of web/http protocal, loadrunner automatically launches Internet

Explorer with the given URL in the recording options, if it does not launch IE ?

Here is the solution:

If it's a web based application, LoadRunner should launch its own IE window for recording. Itwon't record anything if this doesn't happen since it ignores all other windows. Try this to resolvethe issue:Open your Windows Control Panel >> System Properties >> Advanced tab.Click the

"Settings" button in the 'Performance' section and click the "Data Execution Prevention"

tab.Select 'Turn on DEP for all ... except those I select' and make sure that your browsersapplication is included in the list (in my case, Internet Explorer).Shut down Load Runner and

restart it, and good luck  

This API set can be used for the following purposes:

  Unattended creation of an Analysis session that can then be opened in the HP

LoadRunner Analysis.  Custom extraction of data from the results of a test run under the HP LoadRunner 

Controller 

An application that creates an Analysis session can be run automatically at completion of a test

run. In the LoadRunner Controller, open Tools > Options and select the Execution tab. Enter thecommand to run your application in the Post Execution Command box.

The API set provides the following functionality:

  Convert Controller Run results to an Analysis data base file

 Create, modify, and apply a global filter and Graph filters

  Set graph parameters

  Calculate metrics and statistics per Graph in a Run

   Notifications from the API infrastructure to the API application

  Logging at different severity levels

  Ability to run concurrent, independent instances of API-based applications

Limitations: This version of the API set does not support:

  Graph auto-correlation

  Graph merging

  Importing data from external monitors

  XML export of data

  Support Level Agreements functionality

  Use of filters, graphs, and other configurations created in the Analysis user interface

  J2EE Graphs are only partially supported

Prerequisites: To use this API set, you must:

Page 10: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 10/13

  Be a .NET programmer 

  Be familiar with the Controller and Analysis programs

The development environment requires:

 Visual Studio 2005 or any other compiler that supports .NET 2.0

  LoadRunner Analysis

The runtime environment requires:

  LoadRunner Analysis

  A .NET configuration file. A command-line utility to build the configuration file is

 provided in the <Analysis installation>\Additional Components\AssemblyCrawler folder.

In LoadRunner, you can add C Vuser functions to any Vuser script in order to enhance the script.

VuGen generates only a few of the general Vuser functions while you record. If required, the

remaining functions can be manually programmed into a script.

As per my knowledge, below is a list of general API functions for ANSI C scripts. It includes all

 protocols except for Java, VB, and GUI:

Transaction Functions: 

1. lr_end_sub_transaction --> Marks the end of a sub-transaction for performance analysis.

2. lr_end_transaction --> Marks the end of a transaction.

3. lr_end_transaction_instance --> Marks the end of a transaction instance for performanceanalysis.

4. lr_fail_trans_with_error --> Sets the status of open transactions to LR_FAIL and sends anerror message.

5. lr_get_trans_instance_duration --> Gets the duration of a transaction instance specified by itshandle.

6. lr_get_trans_instance_wasted_time --> Gets the wasted time of a transaction instance by its

handle.

7. lr_get_transaction_duration --> Gets the duration of a transaction by its name.

8. lr_get_transaction_think_time --> Gets the think time of a transaction by its name.

9. lr_get_transaction_wasted_time --> Gets the wasted time of a transaction by its name.

10. lr_resume_transaction --> Resumes collecting transaction data for performance analysis.

Page 11: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 11/13

 

11. lr_resume_transaction_instance --> Resumes collecting transaction instance data for 

 performance analysis.

12. lr_set_transaction_instance_status --> Sets the status of a transaction instance.

13. lr_set_transaction_status --> Sets the status of open transactions.

14. lr_set_transaction_status_by_name --> Sets the status of a transaction.

15. lr_start_sub_transaction --> Marks the beginning of a subtransaction.

16. lr_start_transaction --> Marks the beginning of a transaction.

17. lr_start_transaction_instance --> Starts a nested transaction specified by its parent’s handle. 

18. lr_stop_transaction --> Stops the collection of transaction data.

19. lr_stop_transaction_instance --> Stops collecting data for a transaction specified by its

handle.

20. lr_wasted_time --> Removes wasted time from all open transactions.

Command Line Parsing Functions: 

1. lr_get_attrib_double --> Retrieves a double type variable used on the script command line.

2. lr_get_attrib_long --> Retrieves a long type variable used on the script command line.

3. lr_get_attrib_string --> Retrieves a string used on the script command line.

Informational Functions: 

1. lr_user_data_point --> Records a user-defined data sample.

2. lr_whoami --> Returns information about a Vuser to the Vuser script. Not applicable for 

Application Management.

3. lr_get_host_name --> Returns the name of the host executing the Vuser script.

4. lr_get_master_host_name --> Returns the name of the machine running the LoadRunner 

Controller or Tuning Console. Not applicable for Application Management.

String Functions: 

1. lr_eval_string --> Replaces a parameter with its current value.

Page 12: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 12/13

 

2. lr_save_string --> Saves a null-terminated string to a parameter.

3. lr_save_var --> Saves a variable length string to a parameter.

4. lr_save_datetime --> Saves the current date and time to a parameter.

5. lr _advance_param --> Advances to the next available parameter.

6. lr _decrypt --> Decrypts an encoded string.

7. lr_eval_string_ext --> Retrieves a pointer to a buffer containing parameter data.

8. lr_eval_string_ext_free --> Frees the pointer allocated by lr_eval_string_ext.

9. lr_save_searched_string --> Searches for an occurrence of string in a buffer and saves a

 portion of the buffer, relative to the string occurrence, to a parameter.

Message Functions: 

1. lr_debug_message --> Sends a debug message to the Output window or the Business ProcessMonitor log files.

2. lr_error_message --> Sends an error message to the Output window or the Business ProcessMonitor log files.

3. lr_get_debug_message --> Retrieves the current message class.

4. lr_log_message --> Sends a message to a log file.

5. lr_output_message --> Sends a message to the Output window or the Business ProcessMonitor log files.

6. lr_set_debug_message --> Sets a debug message class.

7. lr_vuser_status_message --> Generates and prints formatted output to the Controller or 

Console Vuser status area. Not applicable for Application Management.

8. lr_message --> Sends a message to the Vuser log and Output window or the Business Process

Monitor log files.

Run-Time Functions 

1. lr_load_dll --> Loads an external DLL.

2. lr_peek_events --> Indicates where a Vuser script can be paused.

Page 13: 99178450 Performance Testing Tips

7/28/2019 99178450 Performance Testing Tips

http://slidepdf.com/reader/full/99178450-performance-testing-tips 13/13

 

3. lr_think_time --> Pauses script execution to emulate think time — the time a real user pauses to

think between actions.

4. lr_continue_on_error --> Specifies an error handling method.

5. lr_rendezvous --> Sets a rendezvous point in a Vuser script. Not applicable for ApplicationManagement. ere, I’m going to describe some common recording problems / issues of Load

Runner and how to resolve them. Normally, these problems are faced by everyone. I would

request you all that leave your comments for the problems you face and how you tackle them.

1.  Firefox is not supported: Only Internet Explorer is supported for Web (Click and

Script). To record browser activity on Firefox, use the Web (HTTP/HTML) protocol.2.  Application behaves differently while being recorded: If your application behaves

differently during recording, than it does without recording, you should determine if the

recording problem is unique to Web (Click and Script). The effect may be that a Web

 page will not load, part of the content is missing, a popup window does not open, and soforth. Create a new Web (HTTP/HTML) script and repeat the recording. In the event that

the recording is OK in Web (HTTP/HTML), we recommend that you disable socket levelrecording. The problem may be the result of an event listener. Use trial and error todisable event listeners in the Web Event Configuration Recording Options, and then re-

record your session as a Web (Click and Script) user. To disable an event listener:

o  Open the Recording Options. Select Tools > Recording Options and select theGUI Properties:Web Event Configuration node.

o  Click Custom Settings and expand the Web Objects node. Select an object.

o  Select Disabled from the list in the Record column for the relevant Web object. If 

the recording still does not work, enable the listener you previously disabled, andtry disabling another one. Repeat these steps until your recording succeeds.

3.  Dynamic menu navigation was not recorded: A dynamic menu is a menu that

dynamically changes depending on where you select it. If the dynamic menu navigation

was not recorded, record again using "high" event configuration mode. To set theconfiguration level to high:

o  Open the Recording Options. Select Tools > Recording Options and select the

GUI Properties:Web Event Configuration node.

o  Move the slider to High.

4.  Certain user actions were not recorded: Check if there is a Java applet running inside

the browser. If not, record the script with the Web (HTTP/HTML) protocol.


Recommended