Learn Basic Introduction & preliminaries of HP – LoadRunner through FAQ’s

上一篇 / 下一篇  2011-09-21 17:13:02 / 个人分类:LoadRunner相关

 

Q. 1: What is the process of manual correlation in LoadRunner?

It is the method adopted for capturing the dynamic data resulting from the server responses & further reusing it in the script. It can be done in two ways like:

1.Manual correlation

2. Auto Correlation

<<<<<< =================== >>>>>>

Q. 2: What is the Load testing process in LoadRunner?

Step 1:Planning the test:Involves development of a clearly defined test plan to ensure that the newly developed test scenarios are able to accomplish the load-testing objectives.

Step 2:Creation of Vusers:Involves creation of Vuser scripts which contain various tasks performed by every Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.

Step 3:Creation of the scenarios:A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. Scenarios are created by using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.

Step 4:Running the scenario:The load on the server is emulated by instructing multiple Vusers to perform. the tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.

Step 5: Monitoring the scenario:Scenario execution is monitored using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.

Step 6:Analyzing test results:During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner's graphs and reports to analyze the application's performance.

<<<<<< =================== >>>>>>

Q. 3 : When load and performance Testing are done?

Load testing is performed after the completion of interface (GUI) testing.

Single user testing focuses on functionality and user interface of a system component, while application testing focuses on performance and reliability of an entire system.

For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc.

<<<<<< =================== >>>>>>

Q. 4: What are the components of LoadRunner?

The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.

<<<<<< =================== >>>>>>

Q. 5: What Component of LoadRunner are used for recording a Script?

Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.

<<<<<< =================== >>>>>>

Q. 6: What is a rendezvous point LoadRunner?

Rendezvous points are inserted into Vuser scripts to emulate heavy user load on the server.

Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform. a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.

<<<<<< =================== >>>>>>

Q. 7: What Component of LoadRunner are used to play Back the script. in multi user mode?

Controller component is used to playback the script. in multi-user mode. This is done during a scenario run where a vuser script. is executed by a number of vusers in a group.

<<<<<< =================== >>>>>>

Q. 8: What is a scenario in LoadRunner?

A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.

<<<<<< =================== >>>>>>

Q. 9 : What is the recording mode for web Vuser script. in LoadRunner?

We use VuGen to develop a Vuser script. by recording a user performing typical business processes on a client application. VuGen creates the script. by recording the activity between the client and the server.

For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.

<<<<<< =================== >>>>>>

Q. 10: Why do we create parameters in LoadRunner?

Parameters are like script. variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script. is run. Better simulate the usage model for more accurate testing from the Controller; one script. can emulate many different users on the system.

Q. 11: What is a correlation in LoadRunner?

Correlation is used to obtain data which are unique for each run of the script. and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries).

Corelations are of two types like :

1) Automatic correlation iinvolves setting of some rules for thecorrelation. It can be application server specific. Here values are replaced by data which are created by these rules.

2) Manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.

<<<<<< =================== >>>>>>

Q. 12: How can we find out as to where correlation is required in LoadRunner?

There are two ways to find out the place of use of corelation

1) We can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated.

2) We can record two scripts and compare them.

<<<<<< =================== >>>>>>

Q. 13: Where can we set automatic correlation options in LoadRunner?

We can set the automatic correlation from web point of view in recording options and correlation tab. Here we can enable correlation for the entire script. and choose either issue online messages or offline actions, where we can define rules for that correlation.

Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

<<<<<< =================== >>>>>>

Q. 14: What is the function to capture dynamic values in the web Vuser script. in LoadRunner?

Web_reg_save_param function saves dynamic data information to a parameter.

<<<<<< =================== >>>>>>

Q. 15: When do you disable log in Virtual User Generator in LoadRunner?

Once we debug our script. and verify that it is functional, we can enable logging for errors only. When we add a script. to a scenario, logging is automatically disabled.

<<<<<< =================== >>>>>>

Q. 16: When do we use standard and extended logs in LoadRunner?

Standard Log Option: It creates a standard log of functions and messages sent during script. execution to use for debugging.

It is suggested to disable this option for large load testing scenarios. When you copy a script. to a scenario, logging is automatically disabled.

Extended Log Option: Is selected to create an extended log, including warnings and other messages. We can specify all additional information that needs to be added to the extended log.

<<<<<< =================== >>>>>>

Q. 17: How do we debug a script. in LoadRunner?

VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints.

The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution.

The debug information is written to the Output window. We can manually set the message class within our script. using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script. only.

<<<<<< =================== >>>>>>

Q. 18:How do we write user defined functions in LoadRunner?

Before we create the User Defined functions we need to create the external library (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter.

The function should have the following format: __declspec (dllexport) char* (char*, char). Few examples of user defined functions are GetVersion, GetCurrentTime, GetPltform. etc.

<<<<<< =================== >>>>>>

Q. 19: What are the changes possible to be made in run-time settings in LoadRunner?

The Run Time Settings are:

a) Pacing - Has iteration count.

b) Log - Needs to Disable the Logging Standard Log

c) Extended Think Time - In think time there are two options like Ignore think time and Replay think time.

d) General - Under general tab we can set the vusers as process or as multithreading and each step as a transaction.

<<<<<< =================== >>>>>>

Q. 20: Where do we set Iterations for Vuser testing in LoadRunner?

Iterations are set in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.

Q. 21: How do we perform. functional testing under load?

Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.

<<<<<< =================== >>>>>>

Q. 22: What is Ramp up in LoadRunner?

It is an option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can be specified. To set Ramp Up, go to 'Scenario Scheduling Options'

<<<<<< =================== >>>>>>

Q. 23: What are the advantages of running the Vuser as thread in LoadRunner?

VuGen provides the facility to use multithreading. This enables more Vusers to be run per generator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory.

This limits the number of Vusers that can be run on a single generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number of Vusers (say 100).

Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.

<<<<<< =================== >>>>>>

Q. 24: How can we stop the execution of script. when an error occurs?

The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, executes the vuser_end section and terminates the execution.

This function is useful when you need to manually abort a script. execution as a result of a specific error condition. When you terminate a script. using this function, the Vuser is assigned the status "Stopped". For this to take effect, we have to first uncheck the "Continue on error" option in Run-Time Settings.

<<<<<< =================== >>>>>>

Q. 25: What is the relation between Response Time and Throughput?

The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second.

When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.

<<<<<< =================== >>>>>>

Q. 26: What is the Configuration of systems in relation to the LoadRunner?

The configuration of our systems refers to that of the client machines on which we run the Vusers.

The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc.

This system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.

<<<<<< =================== >>>>>>

Q. 27: How do we identify the performance bottlenecks in LoadRunner?

Performance Bottlenecks can be detected by using monitors. These monitors might be application server monitors, web server monitors, database server monitors and network monitors. They help in finding out the troubled area in our scenario which causes increased response time.

The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.

<<<<<< =================== >>>>>>

Q. 28: How can we find out the web server related issues?

Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that occurred during scenario, the number of http responses per second, the number of downloaded pages per second.

<<<<<< =================== >>>>>>

Q. 29: How can we find out the database related issues?

By running "Database" monitor and help of "Data Resource Graph" we can find database related issues.

<<<<<< =================== >>>>>>

Q. 30: How do we plan the Load in LoadRunner?

Load test is planned to decide the number of users, what kind of machines we are going to use and from where they are run. It is based on 2 important documents, Task Distribution Diagram and Transaction profile.

Task Distribution Diagram gives us the information on number of users for a particular transaction and the time of the load. The peak usage and off-usage are decided from this Diagram. Transaction profile gives us the information about the transactions name and their priority levels with regard to the scenario we are deciding.

Q. 31: What is the purpose of vuser_init action in LoadRunner?

Vuser_init action contains details of procedures to login to a server.

<<<<<< =================== >>>>>>

Q. 32: What is the purpose of vuser_end action in LoadRunner?

Vuser_end section contains details of log off procedures.

<<<<<< =================== >>>>>>

Q. 33: What is think time in LoadRunner?

It is the time that a real user waits between two actions.

For example: When a user receives data from a server, he may need to wait for some time may be several seconds to review the data before responding. This time delay is known as the think time.

<<<<<< =================== >>>>>>

Q. 34: What is think time threshold in LoadRunner

Threshold level is the level below which the recorded think time will be ignored. The default value is five (5) seconds. We can change the think time threshold in the Recording options of the Vugen.

<<<<<< =================== >>>>>>

Q. 35: What is the difference between standard log and extended log in LoadRunner?

The standard log sends a subset of functions and messages sent during script. execution to a log. The subset depends on the Vuser type.

Extended log sends a detailed script. execution messages to the output log. This is mainly used during debugging when we want information about parameter substitution, data returned by the server & advanced trace.

<<<<<< =================== >>>>>>

Q. 36: What is the purpose of lr_debug_message in LoadRunner?

The lr_debug_message function sends a debug message to the output log when the specified message class is set.

<<<<<< =================== >>>>>>

Q. 37: What is the purpose of lr_output_message in LoadRunner?

The lr_output_message function sends notifications to the Controller Output window and the Vuser log file.

<<<<<< =================== >>>>>>

Q. 38: What is the purpose of lr_error_message in LoadRunner?

The lr_error_message function sends an error message to the LoadRunner Output window.

<<<<<< =================== >>>>>>

Q. 39: What is the purpose of lrd_stmt in LoadRunner?

The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This function sets a SQL statement to be processed.

<<<<<< =================== >>>>>>

Q. 40: What is the purpose of lrd_fetch in LoadRunner?

The lrd_fetch function fetches the next row from the result set.

Q. 41: Waht are the various types of goals in a goal oriented scenario in LoadRunner?

Load Runner provides five different types of goals in a goal oriented scenario:

1) The number of concurrent Vusers

2) The number of hits per second

3) The number of transactions per second

4) The number of pages per minute

5) The transaction response time that you want your scenario

<<<<<< =================== >>>>>>

Q. 42: Where do we set automatic correlation options in LoadRunner?

Automatic correlation from web point of view, can be set in recording options and correlation tab. Here we can enable correlation for the entire script. and choose either issue online messages or offline actions, where we can define rules for that correlation.

Automatic correlation for database, can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

<<<<<< =================== >>>>>>

Q. 43: How can we capture dynamic values in the web vuser script. in LoadRunner?

Web_reg_save_param function saves dynamic data information to a parameter.

<<<<<< =================== >>>>>>

Q. 44: How do we use the recording mode for web Vuser script. in LoadRunner?

We use VuGen to develop a Vuser script. by recording a user performing typical business processes on a client application. VuGen creates the script. by recording the activity between the client and the server.

For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.

<<<<<< =================== >>>>>>

Q. 45: What is the use of parameters in LoadRunner?

Parameters are like script. variables. These are used to vary input to the server and to emulate real users.

Different sets of data are sent to the server each time the script. is run. It is better to simulate the usage model for more accurate testing from the Controller where one script. can emulate many different users on the system.

<<<<<< =================== >>>>>>

Q. 46: For load testing, what you should know in addition to the knowldege of LoadRunner tool?

1) Management aspects of Load Testing especially the Planning.

2) Requirements gathering, Profile/Mix,SLA, Acceptance Criteria....

3) Broad understanding of the protocol we need to work with.

4) Basic knowledge of C programming.

<<<<<< =================== >>>>>>

Q. 47: How many users can we emulate with Load-Runner on a PC?

There is no limit. However it depends on system response. That too inturn depends on various factors like entire system configuration etc.

If system comes across bottle necks during the begining or with minimum no of Vusers, no further addition of vusers should be considered unless & until the previously observed bottleneck are adequately resolved.

<<<<<< =================== >>>>>>

Q. 48: How can we find out memory leak using Load Runner?

Setup the scenario with Available Bytes and Committed Bytes as one of the counters to monitor. Run the load test as per the norms. Observe the pattern of memory usage on the designated server with the ramp up of Vusers and see if they correlate.

When the memory usage goes to its peak, exit the Vusers gradually. If there wasn't any leakage, the Available Bytes should increase and Committed Bytes should decrease in correlation with the existing Vusers. If it doesn't happen, means that the memory usage had been very high, and the Vusers have successfully exited. It may indicate the memory leak had existed in the application and this aspect would need to be resolved at the code-level.

<<<<<< =================== >>>>>>

Q. 49: How can we record a command prompt operation in LoadRunner?

We can't record a command prompt operation in LoadRunner. Because LR works on a environment where Client and server talks with each other. It records only the communication of Client to Server and verifies the reply from Server.

<<<<<< =================== >>>>>>

Q. 50 :How can we run QTP scripts in LoadRunner?

1) Install QTP and Loadrunner in same machines.

2) Open the QTP script.

3) .Open Vugen and click on record then all provide all required information in all fields then click "OK" Button.

4) Click F5 or Replay in QTP script.

 


TAG:

 

评分:0

我来说两句

日历

« 2024-04-17  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 16163
  • 日志数: 29
  • 建立时间: 2011-05-23
  • 更新时间: 2012-02-14

RSS订阅

Open Toolbar