Load testing involves simulating a real-life, worst case scenario and answers the question of how the application will respond to maximum capacity.
You just finished your company website rebuild, or maybe even just a new page of your existing website. Your marketing team sends out a blast on social media about the new offering, as planned. Then the traffic hits. A flood of traffic from potential and loyal customers hits the site. They select items for purchase and try to checkout; nothing. Your website crashes, making both your loyal and new customers question your leadership in the industry.
Your C-Suite team catches wind of this situation and calls a meeting. Directors and managers are asked to explain what happened and where all this money went that would give them a leg up on their competitors.
This whole scenario could have been avoided in the first place with something called stress or load testing.
Load testing involves simulating a real-life, worst case scenario. It answers the question of how the application will respond with maximum capacity, and determines if the end users will continue to have the same experience with minimal capacity. It ensures that you can sleep easy knowing that you've put your product up to scrutiny and it passed with flying colors. If issues arise, stress/load tests help you plan ahead while developing a solid budget and more accurate timeframe. Keep reading to learn three keys to load testing success.
What are the 3 keys to successful load testing?
Understand what you are trying to test.
Have a new product or performance you are about to launch? Great! Make sure that if 300-400 people could be visiting, your site won't crash in the process. Much like Goldilocks, you have to make sure you get the what just right. A question like “is the website fast?” is too general for a good load test. Instead, ask yourself why the website is fast. Could it be a mixture of the application, sever, network or end user computer speed?
On the other hand, asking if a page loads fast for a specific user at home is too detailed. So where is a good place to start? Start with something like "according to our analytics, here are the 5 most landed-on pages on our website. We need to ensure that our website can handle X number of concurrent users for an extended period of time in our current hosting environment. These are the 5 most popular pages that we need to be aware of during our tests."
You've now specified a list of pages to test which are not only the most visited, but the most stressful on the application. You've also set a goal to consider the load testing a success. Finally, you've broadened the user base instead of focusing on one individual.
Define your expected outcome.
How will you know if your load test is a success if you don't already know what good looks like? Will you be looking purely for the average page load time? Maybe you'll be looking for the maximum concurrent users on the site before seeing a web site performance issue. The real question when getting your results back is to know what to look for.
If you are looking for peak numbers and you can successfully max out your environment, you'll have an idea of your upper capacity. In addition, you should have an idea of what the experience was like for users once that limit was reached (ex: errors, slowness, etc.). On the other hand, if you were just verifying that you were able to reach a certain capacity (i.e. a certain number of concurrent sessions), you may not have much insight to what the upper limits are. However, rest assured that if your tests "passed", you probably shouldn't see an issue with an upcoming surge in traffic.
Compare your expected results with your actual results.
Much like your 7th grade science project, this is your opportunity to compare your hypothesis to what actually happened. This will help you better understand the results of your load tests and will also guide your development team in narrowing down where to look for potential performance issues. Finding the root cause of a subpar performance test can be a hard item to track down. However, if you have setup your testing parameters correctly, you should be able to tell if you are having site-wide or function-specific issues. This will help your development team narrow down in the root cause.
Keep in mind some things are not controllable or fixable. For example, if your tests show that end users in China have a much slower response time than users in the U.S., you may simply be seeing a common difference in network speeds in different geographical locations. If you run into these conditions, it doesn't mean nothing can be done at all. Instead, you may want to look at the overall page size, the number of included files, images, media, or anything else which may require the end user's browser to work harder than necessary. While some aspects aren't controllable, you can set the baseline for success.
Stress/load testing will help you determine how your website performs under pressure. If you want end users to have the best experience possible, it's important to know the limitations of your website and where to improve. The first step for successful load testing is to understand what you are trying to test. Using data during this step can help solidify top performing pages to test. The second step is to define your intended outcome. What do you hope will happen and what will the experience be like for your users once the limits are reached? The last step is to compare your expected outcome with the actual outcome. Your development team can narrow down the root cause by determining if the issues are site wide or function specific. Sometimes things need to be broken to be made stronger. The same can be said for your website. Successful load testing will help improve your website while giving your users the best website experience possible.
Bottom line, load testing is a "loaded term". It doesn't have a pass/fail metric. It depends on the type of goal you are trying to reach and what results you are expecting to see. It isn't specific to a CMS, coding language or hosting environment. Load testing should always be something you do, both on new sites and to triage existing issues. Once you identify the test cases and what you are expecting your load to look like, you can build a testing plan, and select the right load testing software or site to accomplish that type of test. Have you used load testing services or software before? Let us know in the comments below.
Have questions or comments about this post? We'd love to hear from you.
Diagram's Rob Schall explains how DNS propagation can affect your website launch and makes a recommendation for your next website deployment or update.
Website Traffic Woes?
Google search algorithm updates can wreak havoc on your website’s traffic. Don't let your organic rankings tank. Our free SEO health check can help you identify issues that make Google unhappy with your site.
Like what you read?
Subscribe to our blog "Diagram Views" for the latest trends in web design, inbound marketing and mobile strategy.