Monday, July 20, 2009

Introduction to Performance Testing

It has been a wonderful time for me working in Performance testing. There are lot more reasons for this. First most factor, it is challenging. As a performance engineer, I believe it gives you a great opportunity to look into an application more widely than any other.

What is Performance Testing?

Performance Testing can be defined as the process of evaluating the scalability, stability and availability of an application by subjecting it to the virtual user load resembling real users by using performance testing tools.


Importance of Performance Testing?

Imagine a scenario where if you send a request to the server and waiting for long time to get the response from server. How will you react? Most importantly the end user don't even know when will he get the response. You simply close the application and

look for other sites. It is obvious that the application that responds too slow is likely to be rejected by all users. Your application is affable to the users as long as it responds according to user expectations. So, its the job of a performance engineer to ensure that your application reaching customers expectations and gaining their satisfaction which is most crucial for business growth. By doing performance testing you can answer below questions.

Can the application respond quickly when subjected to the expected load?
What happens when the application experience unexpected user load?
How much the user load can application handle before it starts degrading its performance? (AKA Scalability)

Performance Testing can help you to estimate future requirements of software and hardware to scale up your application for increasing user load.


Types of Performance Testing

Performance Testing can be broadly classified into below categories in which you can select any based on the objectives and requirements of your project

Load Testing
This is the most common type that most of the people adopt to do performance testing. In this testing we impose the application to intended user load and monitor the behavior of the application during test. During this testing we look into the behavior of key business transactions and measure their client side metrics. This testing will enable us to know how the application is behaving when it is subjected to load and how good it is functioning properly for concurrent users working on it. Based on the analysis we do on the test results and data we get after test execution, we evaluate the performance of the application.

In this testing we measure key client side metrics such as response time, hits/sec and throughput and identify the bottlenecks in the application by analyzing these metrics.

Stress Testing
This testing is used to identify the break point of application by applying high workloads. In this testing we keep on increase load until the system breaks up. This testing enable us to figure out how our system behaves if it subjected to unexpected loads and help us predicting future requirements.

In this testing we consider user load more than intended load and apply the users to load simultaneously. If the system performing better we keep on increase the load in steps till the applications performance degrade. This way we can find the maximum number of users the application withstand with acceptable performance.

Benchmark testing

Benchmark is performed against your application in order to determine current performance and ways to improve it. Initially we execute a load tests with default configuration. We call this as base line test and this would be the basis for comparing the benchmark tests. we then modify different parameters and configuratoin, execute several load tests and then compare the results with base line test results. The aim of this testing is to gain additional performance from tuning the configuration parameters of the application.

Benchmark tests are based on a repeatable environment so that the same test run under the same conditions will yield results that you can legitimately compare.
We execute tests varying one parameter at a time keeping all other parameters constant and collect the results. This way we can easily identify what parameters are providing us the performance gain.

Will be adding more shortly.. :)