Quick Load Test with JMeter/BlazeMeter that crawls the Sitemap.xml

When is time to test our websites and see how it is performing from the server side perspective, there are a bunch of tools, options and solutions available. This time I’m using the tool I like the most, it’s free and really powerful: JMeter. In addition to this, we can then easily run our test through BlazeMeter to make sure we get the less impact from the network latency or any other network related issue.

Script that crawls the Sitemap.xml

The main idea behind this script, was to make it completely generic, as for our case we need to run it through a bunch of different sites that we have at our Website Factory. The requirement for passing the performance KPI was to reach a certain throughput (requests per second) in less than 3 seconds average time.

Crawling the Sitemap.xml was then the best option, we have a tool that runs the JMX script from a VM that is in the same datacenter, and we can trigger it just by passing one parameter (domain).

Let’s me now explain a bit how the script works:

User Defined Variables: Configure the user variables to use on the script, the domain is everything you need to setup.

Constant Throughput Timer: This is for the script to generate the traffic we want to test with (throughput).

Set it to 1800 to get a 30 RPS Throughput

I’ve created two diffrent thread groups:

New Sessions and Existing Sessions: Using the HTTP Cookie Manager and HTTP Cache Manager elements, we tell the script to clean the cookies and cache on each iteration. For our tests we need to generate 150 Virtual Users (70% new and 30% returning users):

HTTP Request: We configure here the get method to the domain variable /sitemap.xml

The XPath Extractor: Will take the URLs from the sitemap.xml and store the results in the urls variable.

The foreach controller: Will iterate over the urls previously filled with all the Sitemap.xml urls.

The HTTP Request: Finally, we do the request to the URL.

The Listeners:

  • Summary report
  • Response time over time graph
  • Transactions over time graph
  • Results tree

That’s it! You can now upload it to BlazeMeter and run it from there to get more accurate results, removing any network related issue.

I hope you find this useful, find the script here: GitHub just make sure you have the plugin manager installed on your JMeter.

One thought on “Quick Load Test with JMeter/BlazeMeter that crawls the Sitemap.xml

  1. Pingback: Sitecore server side performance tweaks, tips and quick wins! | Miguel Minoldo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s