Tuesday, May 11, 2010

Performance Testing - A glimpse

What is Performance Testing?
Testing conducted to evaluate the compliance of a system or component with specified performance requirements. Often this is performed using an automated test tool to simulate large number of users.

What is LoadRunner?
LoadRunner is a performance and load testing product by Hewlett-Packard for examining system behaviour and performance, while generating actual load. LoadRunner can emulate hundreds or thousands of concurrent users to put the application through the rigors of real-life user loads, while collecting information from key infrastructure components (Web servers, database servers etc). The results can then be analysed in detail, to explore the reasons for particular behaviour.


What are the LoadRunner components?
LoadRunner contains the following components:
i. The Virtual User Generator captures end-user business processes and creates an automated performance testing script, also known as a virtual user script.
ii. The Controller organizes drives, manages, and monitors the load test.
iii. The Load Generators create the load by running virtual users.
iv. The Analysis helps you view, dissect, and compare the performance results.
v. The Launcher provides a single point of access for all of the LoadRunner components.


Performance Testing Methodology

The flow diagram of over all methodology and the various stages of performance testing are explained below;

Methodology



System Study & Test Plan Preparation
This is the primary step in the process of performance testing. It encompasses the following activities:
• Collect the project artifacts and study the application functionality and its architecture from the performance testing perspective.
• Identification of typical performance test scenarios, which help the team in measuring the performance of the application and finding out the performance bottlenecks if any.
• Identification of various load profiles based on the performance requirements and load patterns.
• Collect the benchmarking specifications, application sizing details etc.,
• Evaluate the suitability of performance testing tools, resource monitoring tools and other required utilities
• Prepare the Performance Test Plan based on the system study and analysis which describes scope, test strategy/approach, test efforts, test schedule, test environment etc.,



Test Environment Set up

• Setting up of an isolated test environment based on the application architecture and other software/hardware configurations. A Test Environment, which resembles the production environment, has to be set up for performance testing.
• Deploy the application under test in the target environment with appropriate test data
• Installation of the load/stress/performance testing tool, resource monitoring tools and other utilities in the target environment.
• Set up the load client machines, test management, defect management, configuration management systems etc.,


Test Script Generation & Enhancements
• Record the identified performance test scenarios as test scripts using the tool with appropriate recording options.
• Enhance the recorded test scripts to parameterize the datapool information and other parameters like session ID, Cookie ID etc.,
• Writing user defined functions and invoking them in appropriate places in test scripts.


Test Execution

• Execute the enhanced scripts as per the load profiles to emulate the required load on the target environment.
• The tests can be scheduled with appropriate sequence to execute the mixed transactions.
• During test execution, the server, network and other resources can be monitored using the resource monitoring tools and utilities


Test Result Analysis & Reporting

• After successful test execution, analyze the test reports & graphs generated by the performance testing tool and resource monitoring utilities to find out the performance bottlenecks if any
• Find out the root cause of the potential performance bottlenecks in coordination with the development team.