You are on page 1of 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. 2. 3. Manual Correlation ( this method is most recommended) 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) Correlation Studio

2.How you will do the manual Correlation? 1. 2. Record two identical scripts with the same business process, make sure to use same input data like user names and search strings 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 Search for the dynamic values in the Generation log and Copy Left boundary (LB) and Right boundary (RB) into notepad 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. Insert web_reg_save_param("Param name", "LB=" , "RB=", LAST) ; where the cursor is pointing Replace the dynamic values with Param name

3. 4.

5. 6.

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", 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

DATE_NOW + ONE_DAY, "next"); "

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?

it is recomednded to keep manual transaction points lr_start_transaction and lr_end_transaction More information about run time settings: Thread 1) If you run each Vuser as a thread. 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. To find 5th vuser value we have to know first what we have give the parameter properties. Let us go with some examples.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 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. the Controller launches only one instance of the driver program (such as mdrv. your table must contain at least 100 unique values. 9. we are more intrested each user action/transaction response time o Define each step as a Transactions .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. thereby enabling more Vusers to be run on a single load generator.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. VuGen behaves according to the option you select in the When run out of values field. in lot of situations application will not accept duplicate values like order number. 10. o Duration . so the answer is 5th iteration. This eliminates the need for multiple re-loading of the driver program/process saves much memory space. 1 iteration. This setting is applicable for both controller and Vugen. Question should also have which parameter properties this scenario is using.60 . 12. If the setting is sales id picked Sequential and update for each iteration.Run logic iteration count will not be considered o Run until completion . how can i know that what is the value of 5th vuser sales id? The question is having little information to answer.exe).Disable this also because it will provide each and every step(Get request or Post request) response time. for every 50 Vusers (by default). Ifyou have 25 Vusers and you want to perform 4 iterations.Run logic iterations will be considered o Vugen : Vuser menu -> Run time settings . So.If suppose we are executing a scenario with 10 vusers and a value is parameterized (Say ex: Sales Id with 10values).What is the purpose of the Unique value? Assigns a unique sequential value to the parameter for each Vuser.Right click . registration functionality. This driver process/program launches several Vusers. 11. rather than measuring response time each and every indivdual steps response time.LRR extension) and find the failed user transaction then we can find vuser ip which is failed.In controller. 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(. in the first iteration all the users will use first value. If it is Unique the 5th sales id will the 5th user will take. These threaded Vusers share segments of the memory of the parent driver process. 2 or 3 Iteration In Controller : Running hourly based Test. . 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. In case if we have to avoid multiple login based on our application then we have to write our own code in "C" language. If you run out of unique values. Eg: Vugen: 1 user. each Vuser running as a thread.Run logic o Controller : Select the script(group) .Disable this option because we do not response time for action blocks. Action. when I am executing the scenario with 10vusers. Ensure that there is enough data in the table for all Vusers and their iterations.In controller I am executing a scenario with 2Vusers and a value is paramerterized ( Say ex: Sales with 10values). Vuser_end) . In real life applications.

If you buy a license. Informix. Select full installation It will install Vugen. Controller. 3) Only thread safe protocols should be run as threads. Loadrunner Installation process:                             The format in the CD will be ISO format. extract it. and PeopleSoft-Tuxedo are not thread safe. If you buy a license. Select full installation It will install Vugen. Generally you can go with custom installation as Controller is not required in our Laptop or Desktop. 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). Readers of the scripts will then be able to recognize each “logical” requests/call made to the serv er. It automatically records every HTTP resource as URL steps. HTML-mode HTML-mode recording is the default and recommended recording mode. extract it. URL-mode and GUI-mode recording When you are starting to record a web application. so need to run as process Loadrunner Installation process:        The format in the CD will be ISO format. It will expire after 10 days. Process 1) If you run each Vuser as a process. Analysis and Loadgeneretor.2) The main advantage of a multi thread environment is the ability to run more Vusers per load generator. Consulting firm can't buy loadrunner license to use it for it's clients. URL-mode The URL-mode option instructs VuGen to record all requests and resources from the server. then the same driver program is launched (and loaded) into the memory again and again for every instance of the Vuser. If you Install Controller. Generally you can go with custom installation as Controller is not required in our Laptop or Desktop. making amendments to the script easily. 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). This limits the numbers of Vusers that can be run on any load generator. Loading the same driver program into memory uses up large amounts of RAM (random access memory) and other system resources. Analysis and Loadgeneretor. you should use that only for your products. Virtual user generator (VuGen) Recording options  Virtual user generator (VuGen) Recording options Difference between HTML-mode. you should be aware of the HTML-mode and URL-mode recording that a Web (HTTP/HTML) protocol. Tuxedo. This recording mode captures even non-HTML applications such as applets and non-browser applications. Sybase-Dblib. If you Install Controller. Controller is only the licnse component. 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. So with out having license also we can create scripts in Vugen As per Licensing Policy. Consulting firm can't buy loadrunner license to use it for it's clients. So with out having license also we can create scripts in Vugen As per Licensing Policy. Controller is only the licnse component. you should use that only for your products. we will just briefly talk about the differences (in general) and how it applies to your script. Controller. It will expire after 10 days. 2) The protocols Sybase-Ctlib. .

lr_log_message: Loadrunner log message functions sends output to replay log but it will not display any line number. 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.    The advantage of this mode is that it generates a script that has all known resources downloaded for your viewing. lr_error_message: This is similar like output message but it will send error to output window and log file along with line number. in URL-mode. Correlation is typically used for handling session id's Correlation Techniques: Manual correlation Automatic correlation. they are recorded as web_custom_request. When reading the script. Win32 executables). this can be selected to allow recording to default to web_custom_request. The concept is similar to functional testing when objects are detected at the GUI-level. Correlation overview: Correlation is the way handling dynamic values in client server communication. When there are unrecognizable requests made to the server in Web (HTTP/HTML) protocol. Pictorial view of how correlation works:  Below is the snapshot of recording and replaying with out applying: . What it does is to detect the fields that have been edited and generate the scripts accordingly. it allows easier reading as the script is based on the GUI presented to the real user. But having everything together creates another problem of overwhelming low-level information and making the script unintuitive. The GUI-mode option instructs VuGen to record all editable fields in an object or non-browser applications. This works good with non-HTML applications such as applets and non-browser applications (e.g. However. GUI-mode  This is introduced with Web (Click & Script) protocol. The values captured will be send back to server in later steps in the script.

where the cursor is pointing Replace the dynamic values with Param name onitoring Unix performance from Loadrunner -controller . "LB=" . Record two identical scripts with the same business process Compare the scripts to identify the dynamic value Search for the dynamic values in the Generation log and Copy Left boundary (LB) and Right boundary (RB) Replay the script with extended log and look for those boundaries in replay log 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. 5. LAST) . 4. Insert web_reg_save_param("Param name". Steps for Manual correlation : 1. 3. "RB=". Below is the snapshot of recording and replaying after implementing correlation. 7. 2. 6.

What does throughput graph contain in loadrunner analysis? 8. How do you diagnose the download over time in web page diagnostics graph in loadrunner analysis? 31. What does page download time breakdown over time graph contain in loadrunner analysis? 36. What does connections graph contain in loadrunner analysis? 25. What does scenario behavior over time graph contain in loadrunner analysis? 5. What are the default graphs generated by load runner analysis? 10. How to compute total transactions per second? 16. What does Rendezvous graph contain in loadrunner analysis? 12. Why do you auto correlate the graphs in loadrunner analysis? 43. What does transaction Summary graph contain in loadrunner analysis? 13. What does total transactions per second graph contain in loadrunner analysis? 17. How do you diagnose the component over time in web page diagnostics graph in loadrunner analysis? 30. What does page download time breakdown graph contain in loadrunner analysis? 35. What does downloaded component size graph contain in loadrunner analysis? 39. How do you do root cause analysis in loadrunner analyzer? 44. What does time to first buffer breakdown over time graph contain in loadrunner analysis? 38. How do you merge the graphs in loadrunner analysis? 41. How do you check the status of scenario SLAs by looking into the colors in loadrunner analysis? 9. What does page component breakdown over time graph contain in loadrunner analysis? 34. What does transactions performance summary graph contain in loadrunner analysis? 18. What are the worst transactions in summary report loadrunner analysis? 3. What does web page diagnostics graph contain in loadrunner analysis? 27. How to compute transactions per second in load testing? 14.                                             1. What does transaction response time under load graph contain in loadrunner analysis? 19. 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. What are the diagnostics options are there in web page diagnostics graph in loadrunner analysis? 29. What are the types of reports generated in loadrunner analysis? . What does transaction response time distribution graph contain in loadrunner analysis? 21. What does transactions per second graph contain in loadrunner analysis? 15.This can be achived through agent less monitoing. What does page component breakdown graph contain in loadrunner analysis? 33. What does http status code summary graph contain in loadrunner analysis? 23. What does summary report contain in loadrunner analysis? 2. What does running vuser graph contain in loadrunner analysis? 6. The controller then queries rstatd and all communication takes place through this established UDP socket connection. What does http responses per second graph contain in loadrunner analysis? 24. What does time to first buffer breakdown graph contain in loadrunner analysis? 37. What does connections per second graph contain in loadrunner analysis? 26. What does throughput MB graph contains in loadrunner analysis? 22. What does hits per second graph contain in loadrunner analysis? 7. Why do you need to merge the graphs in loadrunner analysis? 40. What does transaction response time percentile graph contain in loadrunner analysis? 20. How do you diagnose the time to first buffer over time in web page diagnostics graph in loadrunner analysis? 32. What does auto correlate graph contain in loadrunner analysis? 45. What does vuser Summary graph contain in loadrunner analysis? 11. How does load runner gives the ranking of worst transactions in the summary report? 4. What is the difference between overlay and tile graphs in loadrunner analysis? 42.

This will result in a script which performs both SAPGUI and Web operations.  46. Reason: communication error. 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. 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. Without the workflow the transaction does not write to the data base..exe" was not created on remote host "" The issue: Error: Process "lr_bridge. This is because it failed the 120 secs benchmark.The page may had changed and the LB and RB no longer exists in the application. you need to use SAPGUI together with SAPWeb protocol.0 to perform load test. an equivalent of 2 mins. [MsgId: MERR29987] . Loadrunner supports multiple protocols within the same scripts. However. How do you analyze the worst transactions in loadrunner analysis? 47. LR Agent Error: Process "lr_bridge. straight-forward. This can be due to changes in the page design or application code. Make sure the Agent process or service is running on the remote machine. 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. Imagine a normal application not responding within 2 minutes is serious where we are anticipating an average respond time of 10 secs!. The protocol using is SAPGUI. take note that if your application can respond more than 120 sec. Tip: In order to perform this.exe" was not created on remote host "". This process requires upload of a document from my local machine every time I do the transactions to trigger a work flow. Loadrunner to record Business processes in ECC5.

Make sure the Agent process or service is running on the remote machine.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 .exe" was not created on remote host "". 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.. [MsgId: MERR29987] 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? .exe" was not created on remote host "" The issue: Error: Process "lr_bridge. Reason: communication error.

open Tools > Options and select the Execution tab. Enter the command to run your application in the Post Execution Command box. 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. except those I select' and make sure that your browsers application is included in the list (in my case.Click the "Settings" button in the 'Performance' section and click the "Data Execution Prevention" tab.Shut down Load Runner and restart it. and other configurations created in the Analysis user interface J2EE Graphs are only partially supported Prerequisites: To use this API set. you must: . 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.Select 'Turn on DEP for all . 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. Try this to resolve the issue:Open your Windows Control Panel >> System Properties >> Advanced tab. LoadRunner should launch its own IE window for recording.. Internet Explorer). It won't record anything if this doesn't happen since it ignores all other windows. modify. 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. In the LoadRunner Controller..When you start scripting of web/http protocal. The API set provides the following functionality:        Convert Controller Run results to an Analysis data base file Create. graphs. 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.

  Be a . 9. lr_get_transaction_duration --> Gets the duration of a transaction by its name. 4.NET programmer Be familiar with the Controller and Analysis programs The development environment requires:   Visual Studio 2005 or any other compiler that supports .0 LoadRunner Analysis The runtime environment requires:   LoadRunner Analysis A . lr_resume_transaction --> Resumes collecting transaction data for performance analysis. . If required. lr_fail_trans_with_error --> Sets the status of open transactions to LR_FAIL and sends an error message. lr_get_trans_instance_wasted_time --> Gets the wasted time of a transaction instance by its handle. In LoadRunner. lr_get_trans_instance_duration --> Gets the duration of a transaction instance specified by its handle. lr_end_transaction_instance --> Marks the end of a transaction instance for performance analysis. and GUI: Transaction Functions: 1. A command-line utility to build the configuration file is provided in the <Analysis installation>\Additional Components\AssemblyCrawler folder. VuGen generates only a few of the general Vuser functions while you record.NET configuration file. 10. lr_end_transaction --> Marks the end of a transaction. lr_end_sub_transaction --> Marks the end of a sub-transaction for performance analysis.NET 2. 2. As per my knowledge. 7. the remaining functions can be manually programmed into a script. 3. below is a list of general API functions for ANSI C scripts. 5. lr_get_transaction_think_time --> Gets the think time of a transaction by its name. you can add C Vuser functions to any Vuser script in order to enhance the script. 8. lr_get_transaction_wasted_time --> Gets the wasted time of a transaction by its name. 6. It includes all protocols except for Java. VB.

lr_eval_string --> Replaces a parameter with its current value. 4.11. lr_get_attrib_long --> Retrieves a long type variable used on the script command line. lr_get_host_name --> Returns the name of the host executing the Vuser script. String Functions: 1. Not applicable for Application Management. lr_user_data_point --> Records a user-defined data sample. 3. 12. lr_get_master_host_name --> Returns the name of the machine running the LoadRunner Controller or Tuning Console. lr_start_transaction_instance --> Starts a nested transaction specified by its parent’s handle. 16. 15. lr_set_transaction_status_by_name --> Sets the status of a transaction. lr_start_sub_transaction --> Marks the beginning of a subtransaction. lr_set_transaction_status --> Sets the status of open transactions. lr_wasted_time --> Removes wasted time from all open transactions. lr_resume_transaction_instance --> Resumes collecting transaction instance data for performance analysis. lr_whoami --> Returns information about a Vuser to the Vuser script. lr_get_attrib_string --> Retrieves a string used on the script command line. 20. lr_stop_transaction --> Stops the collection of transaction data. 2. 2. 18. lr_stop_transaction_instance --> Stops collecting data for a transaction specified by its handle. lr_get_attrib_double --> Retrieves a double type variable used on the script command line. 13. 14. lr_set_transaction_instance_status --> Sets the status of a transaction instance. Informational Functions: 1. 19. lr_start_transaction --> Marks the beginning of a transaction. 3. Not applicable for Application Management. . Command Line Parsing Functions: 1. 17.

6. 4. 6. Run-Time Functions 1. 7. lr_message --> Sends a message to the Vuser log and Output window or the Business Process Monitor log files. lr_save_string --> Saves a null-terminated string to a parameter. lr_peek_events --> Indicates where a Vuser script can be paused. 4. lr_eval_string_ext --> Retrieves a pointer to a buffer containing parameter data. 5. lr _decrypt --> Decrypts an encoded string. Message Functions: 1. lr_save_datetime --> Saves the current date and time to a parameter. lr_error_message --> Sends an error message to the Output window or the Business Process Monitor log files. 8. 7. 5. 2. lr_debug_message --> Sends a debug message to the Output window or the Business Process Monitor log files. 3. lr_get_debug_message --> Retrieves the current message class. . lr_load_dll --> Loads an external DLL. lr_log_message --> Sends a message to a log file. lr_save_var --> Saves a variable length string to a parameter. 3. lr_eval_string_ext_free --> Frees the pointer allocated by lr_eval_string_ext. relative to the string occurrence. lr_vuser_status_message --> Generates and prints formatted output to the Controller or Console Vuser status area. 2. 9. lr_set_debug_message --> Sets a debug message class. 8. Not applicable for Application Management. to a parameter. lr _advance_param --> Advances to the next available parameter. lr_save_searched_string --> Searches for an occurrence of string in a buffer and saves a portion of the buffer.2. lr_output_message --> Sends a message to the Output window or the Business Process Monitor log files.

4. lr_continue_on_error --> Specifies an error handling method.3. 2. 3. and try disabling another one. o Move the slider to High. I would request you all that leave your comments for the problems you face and how you tackle them. If not. 1. Select Tools > Recording Options and select the GUI Properties:Web Event Configuration node. lr_think_time --> Pauses script execution to emulate think time—the time a real user pauses to think between actions. 5. . Not applicable for Application Management. In the event that the recording is OK in Web (HTTP/HTML). Firefox is not supported: Only Internet Explorer is supported for Web (Click and Script). a popup window does not open. Repeat these steps until your recording succeeds. I’m going to describe some common recording problems / issues of Load Runner and how to resolve them. record again using "high" event configuration mode. than it does without recording. The problem may be the result of an event listener. Normally. Create a new Web (HTTP/HTML) script and repeat the recording. Use trial and error to disable event listeners in the Web Event Configuration Recording Options. and then rerecord your session as a Web (Click and Script) user. o Click Custom Settings and expand the Web Objects node. If the dynamic menu navigation was not recorded. Select Tools > Recording Options and select the GUI Properties:Web Event Configuration node. To disable an event listener: o Open the Recording Options. o Select Disabled from the list in the Record column for the relevant Web object. Certain user actions were not recorded: Check if there is a Java applet running inside the browser. If the recording still does not work. enable the listener you previously disabled. Select an object. Application behaves differently while being recorded: If your application behaves differently during recording. use the Web (HTTP/HTML) protocol. part of the content is missing. you should determine if the recording problem is unique to Web (Click and Script). To set the configuration level to high: o Open the Recording Options. these problems are faced by everyone. 4. The effect may be that a Web page will not load. Dynamic menu navigation was not recorded: A dynamic menu is a menu that dynamically changes depending on where you select it. record the script with the Web (HTTP/HTML) protocol. lr_rendezvous --> Sets a rendezvous point in a Vuser script. To record browser activity on Firefox. ere. we recommend that you disable socket level recording. and so forth.