From the Blogosphere
Load Testing Defined | @DevOpsSummit #APM #DevOps #Microservices
Includes best practices for load testing web and mobile applications
Mar. 27, 2016 03:45 PM
Whether you're a beginner simply looking to get started or a seasoned vet brushing up on your subject knowledge, this post will serve as a definitive guide on how to perform effective load testing on a web or mobile application.
Load Testing: A performance-related testing process that places simulated demand on software, web or mobile applications in order to measure responses and systems' behavior under both normal and anticipated peak load conditions.
Understanding the Importance and Place of Load Testing in the Software Development Life Cycle
Performance testing, as a whole, is one of the most important things you can do when building out a web or mobile application. Falling under the umbrella of performance testing, load testing ensures that your application can handle expected and unexpected user loads. By realistically simulating user activity and monitoring infrastructure behavior, you can eliminate most, if not all, of the bottlenecks in your web or mobile applications.
The benefits of load testing are monumental. This process not only allows you to provide users with an excellent application experience, but it also helps you determine how much load an application can handle before it crashes in production, when to add another server, when to reconfigure the network, where code needs to be optimized, etc.
In many cases, load and performance testing are pushed off until the end of a development cycle. While Agile methodologies and Continuous Integration make the case for load testing early and often, a large percentage of organizations continue to place load and performance testing on the backburner which ultimately results in later release dates and delayed features.
Plan on incorporating load testing into your software development lifecycle earlier rather than later to avoid costly performance issues down the line.
When You Should Consider Load Testing
If you haven't been load testing your website or mobile application, you should be aware of a few major red flags that could potentially cause your app to crash, leaving you in an incredibly precarious position.
When your customer base grows
It honestly boils down to how fast your customer base is growing, but if you witness a steady increase in users either accessing your website or mobile app, you'll want to hire a performance tester in-house or invest in a comprehensive load testing tool.
When you purchase mainstream ads
You can't predict when or even if your application will go viral, but if your advertising team is going to air a commercial, run a national print ad, etc. make sure that your application and infrastructure are load tested properly.
When your web or mobile app starts to lag
This is a huge indicator that you need load testing. If your web or mobile application's load time slows down, your servers are probably under a bit of pressure. Address this immediately before disaster strikes. Even if you avoid an application crash, slow performance can do permanent damage to a company's image and leave users seeking out a better experience on competing apps.
When your operations team is busy keeping the website running
If Ops is already adding servers or changing configurations to try to handle your application's user load, it may signify that something's wrong with your code. Until you address the issues with your code, you won't be able to scale properly. Continuously adding more servers to mitigate the problem isn't cost effective or realistic.
Load Testing Best Practices
Load testing, perhaps more than any other type of testing, is one of those processes that you either choose to do well or otherwise risk the ever-important availability and performance of your application.
The biggest mistake most companies make when load testing is focusing on a single number: how many concurrent users their application will support. When this is the case, little effort is put into script development which results in unrealistic tests. Unrealistic tests are worthless as they'll yield little to no accurate information about the performance of your application under load in production.
Load testers should think beyond the concurrent users metric and focus on the factors required to produce the most realistic load testing scenarios, which include:
- Geography: load testing with the cloud provides for a geographical distribution of simulated users and will allow you to test outside of your firewall.
- Devices and Browsers: This factor can quickly become a load testing blindspot. Your application may perform in different ways across various devices and browsers. Monitor device/browser software changes and take care to account for any impact on performance.
- User Behavior: Realistic load tests must include parameterized recordings so that variables are randomized and represent what happens most often for people when they traverse popular paths within your application. For even more realism, use Google Analytics to get a sense of the variability of parameters in actual users.
- User Paths: Think carefully about the way a user navigates through your application and try to avoid testing only a limited set of paths. Don't overlook smaller components of your web or mobile application which can include infrastructure packages like JMS or other 3rd-party services.
- Network Behavior: Variations in network latency and bandwidth must be taken into account when performing realistic load testing. Monitor these factors from multiple locations to ensure that they have no real adverse impact on your users.
- Connection Parameters: Modern web browsers send requests to the server using several simultaneous connections, and as such you'll need to simulate an appropriate number of parallel requests during your tests.
Realistic Load Testing Is Key
Keeping it real is paramount to load testing. With the growing demand for perfection in web and mobile application performance, there is no replacement for realistic load testing. Whether you choose to go at it alone or decide to use a dedicated load testing tool, make sure you're accurately representing end user behavior in your testing scenarios. This will result in better performing applications that will keep you, your managers and your application's users happy and satisfied.