You wouldn’t believe how many load tests fail to look beyond the home page. Seriously, many load tests focus on the home page and a few popular landing pages, neglecting to check most, or if not all, of the pages.
No, it’s not enough to replicate the visits of several thousand users in an hour for just one page and consider it a successful load test. With this blog – the fourth in a series about load testing – we’ll review the other user paths you should be considering before launching a website.
The most common mistake made in load testing is focusing mostly on the homepage. The thought is, “That’s the page where all visitors start.” And during development, that’s often where everyone is looking during a load test. Make no mistake about it: the homepage is the one that will rarely have a problem.
But you need to also look at all the other ways visitors enter a site. That’s where you see the tricks a site can play if not properly tested. For example, I once saw a retail site crashing on Black Friday, just about the worst time a customer-driven site can go down. The retailer had done a thorough load test of individual pages but hadn’t tested someone going to the public site and then jumping over to the store site. The home page was tested and pages were simply added on top of it. So you not only want to make sure you’re checking all the important pieces, but also that you understand how users are getting to your site and how they’re navigating around it.
Your first step should be identifying what all the user paths are through a site. For example, it’s easy to follow the clicks of an average e-commerce visitor and thus test accordingly: user logs in, visits a product page, adds a product to a shopping cart, reviews cart contents and completes transaction. But consider testing something atypical: logged in as a new user, search for something out of the ordinary and then navigate to a random result.
Logging in as a new user and creating a unique shopping cart is much more likely to catch problems than testing something more common. Try it next time you test. Randomize what’s actually in the load test. Granted, with certain tools that can be a bit difficult, but you need to make sure you’re not hitting the same product page, the same homepage, the same shopping cart – because that’s not what your actual users are going to do.
Oh, and don’t forget to conduct the same searches if you’re using a system separate from your website. For instance, an Acquia search will work at a different pace than a Durpal site will. You want to make sure that anything your site depends on will behave the same way on the separate system. At Acquia, we sell dedicated search instances to ensure that heavy use of search on your site will scale. You can rest easy knowing all the components of your site are behaving as you’d expect.
Next week, we’ll take a closer look at Web traffic. Until then, don’t forget to test as many pages in as many ways possible – and as different users. You’ll be grateful you did.