Load Testing: 3 Key Steps to Determining if your site is ready for production traffic
Load Testing is an important part of quality assurance that takes place prior to launching a site. This blog post will help you determine how to approach the testing process by analyzing user behavior and outlining the 3 key steps to executing load testing.
Why should I load test my site before launch?
Website load testing is used to simulate user interaction with a website, increase the frequency or the number of interactions, collect the results of system usage, and then analyze them to aid in system improvement towards desired results.
There are three key phases of performing load testing.
- Analysis & Acceptance: Obtain a prediction of potential load and agree on Acceptance Criteria
- Behaviour: Plan and design the test cases and test steps that represent typical usage and prepare the target environment
- Execute, Modify & Repeat: Execute the test and measure the results. If necessary, implement improvements and repeat.
Website Load Testing Phase 1: Analysis and Acceptance
Typically during site migrations we analyze previous site’s traffic by looking at google analytics. We look for traffic patterns and interaction patterns. Looking for highest pageview days over a period of a year or more gives us an idea of typical peak load. Sometimes the trends are seasonal, as in eCommerce sites, so it’s important to look at a longer period of time. User interaction patterns give us an idea on how the end user interacts with the site: how they are logging in, which pages are most popular, how many pageviews are typically generated by the user, what actions they perform. From this data we will create target load numbers and use cases. Then, we can agree on the acceptance criteria of site performance. Those criteria may include total number of error free requests per minute, Apex scores or average response times.
Website Load Testing Phase 2: Behaviour
Build test cases and test steps that will be run by the load test. Sites that provide information typically have scripts that simulate several users consuming information on some of its popular pages. Applications will have scripts which run the user through achieving a goal, such as signing up for an email, creating an account, searching for specific content, etc.
Website Load Testing Phase 3: Execute, Modify & Repeat
At Promet Source, we prefer to use Load Storm for test execution along with New Relic on the server. Load Storm spins up cloud servers which simulate user behaviour through browser requests. It collects the data on each request and provides a graphical representation of the results. By using New Relic, we are able to see performance patterns. We look for average response times, peak response times, slow responding requests, and error rates in order to find a point of failure. New Relic gives us the ability to fine tune the site by providing insights into database performance, which modules or transactions take the most time to complete and shows us which parts of the application have the heaviest usage. This data gives our development team visibility into where the site limitations are and where to focus our efforts.
At the conclusion of load testing the application performs better and everyone (most importantly, the client) has peace of mind that once the site goes live it will be a pleasant user experience for both the end user and the technical staff or internal development team supporting the site.