Overview of Performance Testing

Performance testing is a type of testing intended to determine the responsiveness, throughput, reliability, and/or scalability of a system under a given workload.
Performance testing is commonly conducted to accomplish the following:


  • Evaluate against performance criteria
  • Compare performance characteristics of multiple systems or system configurations
  • Find the source of performance problems
  • Support system tuning
  • Find throughput levels

Why Purpose of Performance Testing

Performance Testing ensures that your application works under real-world loads before your customers find out that it doesn't!

Key Types of Performance Testing

Performance Test

Purpose: To determine or validate speed, scalability, and/or stability.

Load Test
Purpose: To verify application behavior under normal and peak load conditions.

Stress Test
Purpose: To determine or validate an application’s behavior when it is pushed beyond normal or peak load conditions.

Endurance Test
Purpose: To determine the performance characteristics of the product under test over an extended period of time.

Volume/Capacity Test
To determine how many users and/or transactions a given system will support and still meet performance goals.

Scalability Test
To measure system performance while steadily increasing user load.

Performance Management

There are two approaches of managing the performance testing activities, either after the development of the complete application after the system testing (Reactive Approach) or doing the performance testing throughout the Software Development Life Cycle (Proactive Approach). Both approaches have their advantages and disadvantages listed below.

Reactive Approach
Performance Testing is most often approached in a reactive way where performance testing is only done after the System testing.

Advantage

  • Cost effective

Disadvantages

  • Difficult to resolve the performance bottlenecks after the complete development.
  • Defect removal cost is exponentially increased.
  • Whole system can be useless.

Proactive Approach
In proactive approach every performance parameter is analyzed and addressed in testing environment before it really impact the production system and fix it before launching the application. Following activities are performed in each phase of the Software Development Life Cycle (SDLC).

  • Non-Functional Requirements Gathering phase - Start thinking of performance goals.
  • Design phase - Define system performance matrices and their explicit goals.
  • Development phase - Frequently perform performance testing on partially complete features to validate defined performance goals.
  • Test Execution phase - Perform detailed performance testing to verify systems performance goals.
  • Maintenance - Run a performance testing cycle after specific interval and also with every new release to validate the system performance.

Advantage

  • Lower performance bottleneck mitigating cost.
  • All performance bottlenecks are resolved before launching the application.
  • Complete peace of mind and confidence before launch.

Disadvantages

  • More cost associated with performance testing activities when they are exercised in each phase of the SDLC.

Why Performance Testing Life Cycle

1. Establish Performance Test Objectives
2. Prepare test environment
3. Baseline the database(s)
4. Create and modify scripts
5. Execute Performance test
6. Monitor impact of load on servers/databases
7. Analyze results
8. Tune system
9. Repeat from Step 5
10. Deploy mission critical application with confidence

Why to use performance Testing tool?


  • Performance testing is almost impossible without one!
  • Performance testing without a tool relies on massive hardware and personnel to generate load, generally with wildly inaccurate results.
  • Without a tool, no end reports are created.
  • The cost of repeating a 'manual' test never diminishes. When using a performance testing tool, costs go down as you repeat your tests.

Performance Symptoms and Issues

Performance bottlenecks could appear on various areas of the application infrastructure. Following is the list of performance symptoms that could appear at various levels of an application.

Symptoms of web application performance problems

  • Long response time
  • Memory leaks
  • High CPU usage
  • Too many open connections 
  • Length queues for requests
  • Too many table scans of database
  • Database deadlocks
  • HTTP errors
  • Pages not available

Typical database problems

  • Insufficient indexing: Tune database indexing to improve query processing
  • Fragmented databases: Place table records into adjacent pages
  • Out-of-date statistics: Degrade query optimizer performance
  • Faulty application design: Excessive DB calls, excessive data requests

Typical Web Server problems

  • Poor server design: Inefficient data or page caching
  • Memory problems: Physical memory constraints

Typical app server problems

  • Poor database tuning: Application server sending too many DB requests
  • Poor cache management: Produces high CPU usage, disk access
  • Poor session management:  Produces high CPU usage, disk access, Time-outs
  • Poor security design: Excessive use of https protocol

Network problems

  • Potential sources of network problems:
  • Firewall throughput
  • Internet access throughput
  • Load balancers, gateways, routers

Challenged with Performance Testing

Conducting a successful performance test is not a piece of cake. There are many challenges that you need to successfully face to conduct a successful performance test. Following is a list of these challenges:

  • Test environment setup
  • Collection and Analysis of huge data
  • Bottleneck root cause identification
  • Cooperative effort required (Product vendors, Architects, Developers, Testers, Database administrators, System administrators, Network administrators)
  • Obtaining accurate results
  • Client involvement
  • Testing inside the firewall
  • Performance testing of new technologies
  • Testing on live environment
  • Expensive