Wednesday, 29 February 2012

Loadrunner Certification Exam questions

Load Runner Exam

1)    What is a LoadRunner scenario?

2)    What is the advantage of running the Vuser as thread?

3)    What are the components of LoadRunner and write file extensions for each component. 

4)    What is a function to capture dynamic values in the web Vuser script?  and write a syntax for the same.? 

5)    What is think time? and write a syntax function for think time?

6)    Write the steps for Manual correlation?

7)    Write all the message functions you know?

8)    Error: “No match found for the requested parameter 'ParameterName'. If the data you want to save exceeds 256 bytes”. If you find this error while correlation, what Is the debug action you perform? 

9)    Write the Syntax for web_reg_find function and also write the purpose of it.

10) What are the function names to convert integer to String and string to Integer?                             

11) Write the different goal types available in Goal oriented scenario?

12) What is the difference between Execute load test for “Run until completion”.

13) Write 4 memory counts and their description.

14) Write 2 CPU counters and their description.

15) How many controllers/ Load Generators and user licenses are there in your company (this is not a right/wrong question – You will get score based on realistic answer you provide) 

Thursday, 16 February 2012

Key Types of Performance Testing

The following are the most common types of performance testing for Web applications.
Performance test
To determine or validate speed, scalability, and/or stability.
A performance test is a technical investigation done to determine or validate the responsiveness, speed, scalability, and/or stability characteristics of the product under test.

Load test
To verify application behavior under normal and peak load conditions.
Load testing is conducted to verify that your application can meet your desired performance objectives; these performance objectives are often specified in a service level agreement (SLA). A load test enables you to measure response times, throughput rates, and resource-utilization levels, and to identify your application’s breaking point, assuming that the breaking point occurs below the peak load condition

Endurance testing i.s a subset of load testing. An endurance test is a type of performance test focused on determining or validating the performance characteristics of the product under test when subjected to workload models and load volumes anticipated during production operations over an extended period of time.

Endurance testing may be used to calculate Mean Time Between Failure (MTBF), Mean Time To Failure (MTTF), and similar metrics.

Stress test
To determine or validate an application’s behavior when it is pushed beyond normal or peak load conditions.
The goal of stress testing is to reveal application bugs that surface only under high load conditions. These bugs can include such things as synchronization issues, race conditions, and memory leaks. Stress testing enables you to identify your application’s weak points, and shows how the application behaves under extreme load conditions.

Spike testing is a subset of stress testing. A spike test is a type of performance test focused on determining or validating the performance characteristics of the product under test when subjected to workload models and load volumes that repeatedly increase beyond anticipated production operations for short periods of time.

Capacity test
To determine how many users and/or transactions a given system will support and still meet performance goals.
Capacity testing is conducted in conjunction with capacity planning, which you use to plan for future growth, such as an increased user base or increased volume of data. For example, to accommodate future loads, you need to know how many additional resources (such as processor capacity, memory usage, disk capacity, or network bandwidth) are necessary to support future usage levels.

Capacity testing helps you to identify a scaling strategy in order to determine whether you should scale up or scale out.


Loadrunner Recording options

Loadrunner has two recording options in the HTTP Protocol
  • HTML
  • URL
HTML Recording mode:  Records separate step for each user action.
URL Recording mode:  Records all request's and resources from the server.

Loadrunner Installation and Licensing policy

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.

Tuesday, 14 February 2012

What is correlation

Correlation is where the script is modified so that some of the hard-coded values in the script are no longer hard-coded.
 Rather then sending the original value to the server, we may need to send different values.
 For example, the original recorded script may have included the server sending the client a session identification number, something to identify the client during that particular session.
This Session ID was hard-coded into the script during recording.
During replay, the server will send the client a new Session ID.
You need to capture this value, and incorporate it into the script so you can send it back to the server to correctly identify yourself for this new session.
If you leave the script unmodified, you will send the old hard-coded Session ID to the server.
The server will look at it and think it invalid or unknown, and so will not send the pages that have been requested.
Replaying a script with an old Session ID will not successfully fool the server into believing it is a client.
Correlation is the capturing of dynamic values passed from the server to the client and back.
You save this captured value into a parameter, and then use this parameter in the script in place of the original value.
During replay, the replay engine will now listen to what the server sends to it, and when it makes requests of the server, send this new, valid value back to the server; thus fooling the server into believing it is talking to a real client.

Thursday, 9 February 2012

Loadrunner components - Vugen, Controller, Analysis

Loadrunner components 

 Loadrunner has mainly three components.
  • VuGen (Virtual user generator)
  • Controller (License based component)
  • Analysis
Apart from these components there are other components like LoadRunner Agent process.
The purpose of Vugen is to create scripts for single user and do the required enhancements to the script in a such a way that it can be run for multiple users.
The purpose of Controller is to Run the load test and monitor the servers during load test execution. In loadrunner language is to create scenarios and the run the loadrunner controller scenario. Generally Controller installed in a client environment machine which will be configured with loadrunner license for defined number of users. Performance engineers to connect to this machine to run the load test. If the client has multiple projects and multiple performance engineer resources, client may setup mutiple controller with multiple licenses.
Analysis will be used to Analyze the results and creare graphs and reports to present the performance test report to stake holders.

File Extensions:
VuGen        :     .USR is the file extension.
Controller   :     .lrs  is the file extension. - -> .lrr 
Analysis      :     .lra is the file extension

Loadrunner environment:
Number of machines required in loadrunner test environment. In general you can use one machine by installing all the components one box.
  • 1 Machine: Controller, Vugen, Anaylysis and Loadrunner agent process. The disadvantage is we may not able to run bigger load test. 
  • Multiple Machine:
    • Controller1 - 1 Machine - 1000 user license
    • Load generators  - 3 Machines
    • Controller2 - 1 Machine - 3000 user license 
    • Load generators  - 3 Machines
    • Controller4 - 1 Machine - 2000 user license
    • Load generators  - 3 Machines
Performance Center: 
In performance Center License will be calcuate on cumulative basis and this is one of the best feature in Performance center.

90th percentile Response time Loadrunner analysis report

The 90th percentile is the value for which 90% of the data points are smaller.

The 90th percentile is a measure of statistical distribution, not unlike the median. The median is the middle value. The median is the value for which 50% of the values were bigger, and 50% smaller. The 90th percentile tells you the value for which 90% of the data points are smaller and 10% are bigger.
Statistically, to calculate the 90th percentile value:
1. Sort the transaction instances by their value.
2. Count the total number of transactions (Let that be T).
3. Calculate 90/100 * T = Position (P)
4. This calculated position (P) contains the 90th percentile value (V).

There are certain instances of transaction "t1" with the values 1,3,2,4,5,20,7,8,11,6 (in sec).
1. Sort by value -- 1,2,3,4,5,6,7,8,11,20.
2. Count the total number of transactions; T= 10;
3. Calculate 90/100 * 10 = 9; Here P = 9.
4. Position 9 contains the 90th percentile value =11; V=11.

This 90th percentile value is considered as the benchmark.

I love Loadrunner