They say that no plan survives contact with the enemy; by the same token, no web application survives its first contact with users, no matter how thoroughly it’s been tested. However, that doesn’t mean that you shouldn’t try to test an application to its limits. Most developers do performance testing, but one type of testing that is easy to overlook is load testing.
Although often used interchangeably, performance testing and load testing are not exactly the same. Performance testing is the more general practice of testing an application’s responsiveness and stability under real-life scenarios.
Load testing is a specific subset of performance testing that is meant to determine the application’s quality of service when being used by a specific number of users simultaneously. Load testing software simulates numerous simultaneous uses throughout the application, allowing you to identify bottlenecks caused by throughfare or by massive concurrency.
For example, I noticed that users of a blogging application were experiencing slowdowns while trying to edit their own content, an issue I had never noticed during conventional testing. By using load testing software called Apache JMeter, I found that a Ruby gem was causing a 20% slowdown for this particular functionality. I never would have identified the source of that bottleneck on my own.
Load testing may seem like an obvious practice but it can be overlooked. When you test your own application each day, it is easy to forget that what you see and what your users see may be very different. Any client-server application needs load testing in order to determine its limits and improve user experience.
Of course, your own personal development environment is a far cry from what your application will see during professional use. While there is some merit to load testing in your production environment, it’s more realistic and safer to either replicate your own, or reproduce a client’s environment. No matter what you do, make sure that your testing environment is not using third-party plugins like PayPal. There are plenty of modules that can simulate those aspects of your application, but the only thing interacting with the test should be virtual users.
Testing in a staging environment is key to performance testing of all stripes. Having one gives you a buffer between your development environment and the client’s production environment. This allows you to catch errors and slowdowns before you push to production, thus keeping your clients happy. There are many online tools that can help your team set up a staging environment for your site, including SiteGround and Vagrant. Use these software suites to create a staging environment that closely resembles real-use cases.
The most popular load testing software is LoadRunner, but there are many viable alternatives out there. Below, we’ve evaluated the pros and cons of several of these load testing software suites so you can evaluate what best fits your needs.
Apache JMeter
JMeter, like most Apache software, is open source. This makes it ideal for independent developers, but it’s not as effective for applications that anticipate thousands of users per day.
Pros:
Cons:
Locust
Locust is a Python-based load testing software. It is completely open source, and allows users to create their own testing suites using pure Python code.
Pros:
Cons:
Loader.io
Loader.io is a cloud-based load testing service, with a robust free option available.
Pros:
Cons:
Gatling
Gatling is another open source load testing suite. Like Locust, is allows text-based scripting, using their own domain-specific language. There is also a paid option called Gatling FrontLine.
Pros:
Cons:
BlazeMeter
BlazeMeter is a popular platform as service designed to work with JMeter. It is able to make up for the scalability and visualization weaknesses of JMeter, but it is not open source.
Pros:
Cons:
Radview WebLOAD
WebLOAD is one of the longest-standing load testing software suites available, and is currently on version 10.3.1. It has a limited free release, and the premium version price depends on your projected virtual users per day. Its tests are based in JavaScript.
Pros:
Cons:
Micro Focus LoadRunner
One of the most popular load testing tools available, LoadRunner is arguably the most reliable and versatile load testing software suites. Like WebLOAD, a free version is available, with price increases for running more simulations.
Pros:
Cons:
IBM Rational Performance Tester
Rational Performance Tester is a tool created by IBM, primarily designed to test Java-based applications. IBM offers several tiers of payment for use of the software license.
Pros:
Cons:
SmartBear LoadUI Pro
This is a load testing tool from the makers of the popular SoapUI API testing software. It is best suited towards testing SOAP-based applications, and is one of the most expensive options on the market.
Pros:
Cons:
These are just a few of the more popular load testing tools. There are many more out there, so don’t be afraid to shop around for one that is best suited to your particular application.
When considering which to pick, think about these factors:
Once you’ve picked which load testing software to use, you might find yourself unsure of how to start. Some of the software suites, like WebLOAD and Locust.io, have extensive documentation and customer support for beginners, while BlazeMeter and LoadUI do not. Here are a few best practices to keep in mind while setting up your load tests.
Remember, function should always take priority over form. Clients want a product that looks good, but only if it also works consistently and efficiently. By making regular load tests a part of your production cycle, you can identify lag before it becomes an issue, making you and your client much happier.
Looking to add a blog or CMS to your current website while continuing to use your choice of tech stack? Read our guide on CMS Integration.