Let’s say you are a web developer and have now come around to load testing your website. It’s important to make sure the load test results are reliable and useful; so how do you guarantee this? Take a look at these 3 useful load testing tips you can use with LoadStorm 2.0 to get more effective results and save time.

Tip one: Scale Gradually

If you’re a first time web performance tester, it is a good idea to underestimate rather than overestimate the amount of load your server can handle. If your initial influx of VUsers is too high from the beginning, you will immediately see a huge spike in errors, as well as respective drops in throughput and requests per second. Nobody wants to go through that because it wastes time and money. Begin by scaling gradually. Choose a long test duration so the increase in users over time (ramp up) is lessened. This will produce more meaningful results. An example are the two images below. Notice the first has a higher ramp up and initial VUser count than the second graph, but also a large increase in error rates and response time.

What happens if you ramp up too fast (Click to expand)

Slower ramp up same peak VUsers, longer duration

Tip two: Eliminate Errors

You’ve finished generating a HAR recording which simulates VUser activity for your site, then you upload it to LoadStorm and run a test. You then discover that your 404 error rates are through the roof! These errors are easier to handle when in the Recording and Scripting stages. Some errors might be unavoidable during the load test, like timeouts and HTTP 500 status returns. Ideally, there should be no errors before the load test. One of the easiest error to eliminate is a 404. It’s just a matter of doing one of the following:

  1. Adding the resource that is returning a 404, even if it’s a blank one, make it return 200.
  2. Remove the request for that resource from the HAR file altogether.

Make sure your script looks like this…

And not this…

Tip three: User Data

Now let’s say you want the VUsers to hit a bunch of web pages. However, you don’t want to go through the process of making HAR recordings that hit every page in your site. At that point, it would be the perfect time to take advantage of the User Data feature in LoadStorm! Simply generate a comma-separated values file (CSV) of all the web pages you wish to hit. Then upload that file, and use URL replacement on a script made from a small HAR recording. Additionally, you can use query string replacement. For example, if you’ve got a search feature that uses query strings, you can simulate users putting in popular search terms. This data can be read from a User Data CSV file.

An example of what a processed CSV might look like in LoadStorm 2.0

Take advantage of these tips. As load testing becomes more complicated, these can help you save time and produce more reliable results. Are there any other tips you have come across while load testing in general?

Similar Posts