Entity view (Content)

5 W's to Performance Testing

By shaughn
Mar. 3, 2016

As our technology becomes more complex and user base continues to grow, performance becomes an integral factor to keeping consumers and holding off the competition. It's becoming more important to sustain the efficiency of applications while catering to a higher quality of code and higher quantity of users.

In this Blog, we will be examining the importance of performance testing in regards to web applications by going through the Who, What, Where, When, Why and How.

Why

 

How would a user feel if it takes over an hour to submit a simple form within an application? What if the user receives an error half the time they load the form? What if the submission itself fails half the time?

These are all example of simple questions as to why performance testing is necessary. When taking into consideration all the moving parts within an application, such as the code, servers, databases and network, all these parts would have to be compatible and execute efficiently together for end users to have a satisfactory experience.

Consider the following factors: 

    • Web Server Capacity
    • Executions (Actions) to be Performed
    • Number of Hits (Users)
    • Embedded File Types
    • Bandwidth
    • Server Specifications (Hardware and Software)
    • Programming

For Web Applications (especially larger ones), the performance can easily be affected by the factors above. For example, a badly written script can cause the server to take extra resources to execute. Bandwidth issues can cause slowness in response time for end users. A server with limited capacity could handle a low amount of users optimally, but what would happen when that figure reaches into the thousands? Combine all of these factors together and even more performance issues could occur. This is where performance testing comes into play.

What

 

Performance testing is performed to evaluate how the system performs under different workloads. It can be used to validate and verify quality attributes (i.e. speed, scalability and reliability) of the application or system.

By executing a load on the application and monitoring it, we're able to understand the behavior of the system more clearly. Before an application is available to the public, it's not often that the application would have to deal with a higher quantity of users from all around the globe, using different devices, browsers and networks. Performance testing is executed to emulate the behavior of real users on the application to discover and address bottlenecks within the system. 

The most common types of performance testing are:

    • Load Testing
    • Stress Testing
    • Capacity Testing

Load Testing

This is the most common form of performance testing. An expected load is used to determine the behavior of the system under normal and peak load conditions. This type of performance testing will reveal “how” the system handles concurrent users effectively. 

Stress Testing

Stress testing is used to determine the behavior of the system when it's pushed beyond its normal and peak conditions. Not only does it identify break points, it also helps us observe the stability of the application. 

Capacity Testing

Capacity testing is performed to determine the amount of load the system will support while still meeting performance goals. In other words, it determines the amount of users your application can handle either before performance or stability becomes unacceptable. 

The following are the goals of performance testing: 

    1. Demonstrate that the system meets performance expectations
    2. Measure which part of the system causes the system to perform badly
    3. Identify risks involved in structure and architecture
    4. Analyzing, finding and fixing performance issues
    5. Performance planning for future iterations of the system

Where

 

An environment similar to the Production (Public) environment is recommended for performance testing. To understand the behavior of the system, the application should be tested in an environment that is equivalent to the environments the end users will interact with once the application is released. For accurate performance results, it's a necessity to have access to an identical environment to capture all of the bottlenecks of the system under sufficient load. An environment that is largely different than the production environment may yield inaccurate results.

Who

 

Although anyone with technological skills can execute a performance test, it's a task often completed by performance engineers or software architects.

Not only is it essential to understand the structure (both software and hardware) of the application, it's also equally as important to understand the performance results and how it correlates to the application. In addition, it's beneficial to have adequate knowledge of programming to understand the application code base and to create test scripts.

Performance testing is a difficult task due to the knowledge required. It takes a substantial amount of knowledge in programming, information technology and server architecture.

When

 

Performance testing can start as soon as the components are all in place. Although the planning of the performance strategy can be started earlier, the execution of the performance scripts itself cannot start until the Application is available. In addition, whenever a large code, server or network change is implemented, it is a best practice to review the performance of the application to ensure there is no negative change introduced.

Performance Life Cycle:

 

How

 

The following are two performance tools available on the market:

Apache JMeter

Apache JMeter is the primary performance tool used at Appnovation. It's an open source load testing tool built off of the Java platform. Not only does this tool provide small to large scale performance tests, but it's also a tool that can be used to perform functional and automation testing. On the downside, it's no easy feat to analyze the performance results from JMeter itself. Although Apache has provided plugins to enhance the user experience, the listeners generated by JMeter may not provide an experienced performance engineer with the adequate resources necessary. 

HP LoadRunner

Unlike JMeter, HP LoadRunner is not an open source platform, but it's considered the most popular performance tool used in the industry. Similar to JMeter, HP LoadRunner is a performance tool that can be used to execute small to large scale performance tests. Although there is a licensing fee associated with the tool, HP does offer an extraordinary amount of support for their users. In addition, LoadRunner is more popular for experienced performance engineers as it provides better results analysis than JMeter.

Although there are many other tools available, JMeter and LoadRunner are the more popular performance tools available today.