Learn About Performance Testing Types
Learning Objectives
After completing this unit, you’ll be able to:
- Identify different types of performance tests.
- Explain the purpose of each type of performance test.
Performance testing (which you learned is a form of non-functional testing) is an umbrella term that encompasses two main types: load testing and stress testing. Each of these two categories has more subtypes. Let’s dive in.
Load Testing
Load testing applies an expected load to the application and measures the impact of adding that load. The goal is to verify that the application can run at a high-performance level with a normal workload. This accounts for the day-to-day usage of the application. For a website that sells tickets, a load test would check that it still works with the normal traffic of consumers visiting to buy seats for different shows. An application that fails a standard load test is not ready for release to end users.
Smoke testing, a common form of load testing, runs a minimum load to make sure the baseline expectation is met before proceeding with more advanced testing. If smoke testing fails, it signals foundational issues that must be addressed before testing more nuanced areas of its performance.
Stress Testing
Stress testing is similar to load testing except that instead of applying a normal load, it goes beyond the expected load to push the system to its upper limits. The goal is to identify the breaking points by putting an extreme workload on the application. For example, stress tests can reveal the maximum number of users an application can handle before it breaks. On a ticket-selling website, this would be the number of users it can handle before it crashes and no tickets can be sold. While a load test may handle 100 users, a stress test might find that the application breaks at 1,000 users. If 2,000 users are anticipated, then the website is not prepared for the workload.
A spike test is a specific type of stress test that creates a rapid increase in a short amount of time. This differs from a standard stress test, which gradually increases demand to identify the maximum point. Teams conduct spike tests to determine how well an application can handle a large number of users all logging on to the website at the same time, such as when tickets for an in-demand concert are released for sale.
Other Performance Test Types
Load and stress tests are the two main types of performance tests, but there are others. Scalability testing is conducted to learn how well an application will be able to grow. Teams use this testing to gauge the future capacity of an application.
Finally, soak testing, also known as endurance testing, checks the stability of a system with a normal workload over an extended period of time. This allows it to monitor memory usage and detect potential performance-impacting memory leaks.
Let’s review all the performance testing types by looking at the key question each one aims to answer.
Test type | Question to answer |
---|---|
Load | Can the application handle a normal workload? |
Smoke | Can the application handle the minimum workload? |
Stress | What are the limits of the application? |
Spike | How does the application handle a sharp increase in workload? |
Scalability | Can the application scale in the future? |
Soak | How does the application handle a sustained workload? |
Sum It Up
The next time you buy tickets to an event, consider your experience on the website. You might complete your purchase, but is the site reasonably responsive to your requests? Is it able to handle a large number of requests at once? If you face any performance issues, which test(s) might reveal helpful information about them?
All in all, teams need to test both the functional and non-functional aspects of an application. When looking at the non-functional tests, explore performance testing to see how well the application works for the end user. The choice of the specific performance test depends on the expectations of the application’s workload and conditions.