What Are Stress Tests?
Stress tests are a type of performance test designed to see how an application behaves under extreme (unexpected or abnormal) loads. While spike tests immediately overwhelm the application, stress tests gradually introduce a greater load in steps in order to see exactly what load causes a problem and where the problems begin to surface.
Stress tests can help you determine:
- How the system behaves under extreme conditions.
- The maximum number of concurrent users or throughput.
- The breaking point and failure mode.
- If the application recovers without intervention.
Stress tests can also help DevOps teams ensure that their infrastructure performs the way they expect. For example, many infrastructure solutions have auto-scaling capabilities and stress tests can help determine how quickly the infrastructure adapts to increasing loads, and if there are any failures that occur during the scaling events.
Stress tests can run on protocol-based or browser-based tools, such as LoadNinja, and generate the same metrics as other performance tests, such as average response time or error rate.
#1: Identify the Right Scenarios
Most performance testing efforts focus on the most common user workflows. For instance, an ecommerce site might focus on testing the checkout process. The problem with exclusively testing these scenarios is that you might miss less popular – but more profitable – user workflows that have an equivalent impact on the bottom line.
Suppose an ecommerce site has a wish list feature that many returning customers use to plan for the holidays. While the feature may not be used most of the year, the holiday season leads to a lot of users leveraging it. Any failure to handle the holiday load could result in a significant amount of lost sales.
#2: Account for Network Speed
Stress tests can help you determine the breaking point of an application, but you need to use the right parameters for accurate results. If half your users are on mobile devices, network speed plays a key role in the performance of the application. A modest slowdown on the server side could have a much larger impact on an LTE-connected phone than a desktop.
Mobile Traffic Continues to Grow – Source: Broadband Search
If you’re stress testing a socket-based application, slower mobile connections could influence the number of available connections to the server at a given point in time. A user that takes longer to progress through a workflow could translate to an extended connection that influences the maximum number of simultaneous users.
#3: Test Different Types of Users
Many applications have multiple types of users that each have a different value. For example, an ecommerce application may have casual visitors and return customers. When running stress tests, return customer workflows should generally be prioritized since they have a significantly higher value than casual visitors that make fewer purchases.
Some types of users may also have greater risks associated with them than other users. Common example: administrative users that manage sensitive tasks. If one of their tasks fail, there could be a much more catastrophic outcome for the application than a failure associated with a more common, non-administrative workflow.
#4: Make It a Part of Your Process
Many development teams run performance tests ad hoc before an expected event (e.g. a holiday, marketing campaign, or launch). While stress tests are critical at these junctures, they should be run on a regular basis to provide the most value. The best way to do that is to incorporate them into your continuous integration and deployment processes.
When incorporating stress tests into the Agile process, also ensure there’s enough time to fix issues . Test engineers should take part in daily scrum meetings and incorporate testing into the development cycle. If an issue arises, test engineers should quickly communicate them to developers to fix within the sprint.
#5: Create a Plan to Assess the Results
Running stress tests isn’t enough to improve performance – test engineers must assess the results of the test and report bugs to developers. In addition, developers must follow up quickly enough to make any fixes before the application is scheduled to deploy, which means that a well-defined plan should be in place to ensure a smooth process.
The best way to address bottlenecks identified by stress tests is to use browser-based performance testing tools. By using a browser, test engineers can look at things like navigation timing to determine when issues started to arise. Developers can also dive into individual browser sessions to see what part of the application experienced degradation.
LoadNinja Actionable Metrics – Source: LoadNinja
LoadNinja provides a machine learning assistant that can automatically identify abnormalities for follow-up, which cuts down on the time it takes to find and fix problems.
The Top and Final Tip
Stress tests play an important role in application performance testing. By keeping these five tips in mind, your stress tests can provide maximum value.
If you’re overwhelmed with performance testing, LoadNinja can simplify the process with an easy-to-use, browser-based platform. Record and replay capabilities make it easy for anyone, so they can quickly develop browser-based load tests.
Scale across tens of thousands of real cloud-based browser instances, and get the most accurate results.