Announcing multi-region load tests and support for Locust framework in Azure Load Testing

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

We are excited to announce the launch of two new features in Azure Load Testing: multi-region load tests and support for Locust framework. Azure Load Testing is a fully managed service for performance testing that helps developers and testers easily generate high scale load and identify performance bottlenecks.

 

With multi-region load tests, you can now simulate load from multiple geographies simultaneously in a single test run, to closely mimic the real-life traffic patterns. With the in-built dashboard, you get an aggregate view of performance across regions, and you can drill down to a specific region and compare performance metrics across regions. Running multi-region load tests will also help you better validate your network architecture, load balancing components and failover capabilities. This feature is now generally available.

 

Azure Load Testing now supports Locust, a Python based open-source framework for performance testing. Locust is a developer friendly framework that lets you write code to create load test scripts as opposed to using GUI based test creation. You can check-in the scripts into your repos, seek peer feedback and better maintain the scripts as they evolve, just like developers would do for any other piece of code. You can use your existing Locust scripts as is and run them at scale using Azure Load Testing to unlock the benefits of a managed service. You can now use JMeter or Locust or a combination of both depending on your familiarity with the framework and the suitability for your scenarios. This feature is currently in limited preview, and you can sign up here.

 

Let’s see how these two features can help us validate the performance of the Contoso Traders web application (a fictitious, sample app for demos) across various geographical locations.

Author a test script using Locust

Contoso Traders e-commerce web application provides an online shopping experience where users can browse various products by categories, view product details, view the cart etc. Now, we want to simulate a simple user flow where users visit the homepage, view the list of products and add a product to the cart. We can write Python code and create a Locust script for this scenario.

Nagarjuna_V_0-1716145102845.png

This is a basic Locust script. You can more realistically mimic the user behavior by using various constructs that Locust supports. You can use Locust plugins, provide test data using a CSV file, use config files with Locust etc. and seamlessly get those working with Azure Load Testing.

Here, we used Locust for test script creation. However, you can also use JMeter or configure the requests directly in the Azure Load Testing experience.

Run the test and analyze results using Azure Load Testing

Now, let’s take the script that we just created to Azure Load Testing and simulate a global usage pattern.

  • To create a test in Azure Load Testing, we just upload the script and specify the load that we wish to simulate.

Nagarjuna_V_0-1716145501009.png

 

Nagarjuna_V_1-1716145548941.png

  • To simulate load from users across the globe, we just have to select the regions from which we need to generate load and the share of load from each region. The service takes care of the rest.

Nagarjuna_V_2-1716145633622.png

 

Nagarjuna_V_3-1716145675746.png

Once the test is run, we can see a rich dashboard showing a summary of how the e-commerce application fared overall and a comparison of performance metrics across the regions. We can also slice and dice to view metrics specific to a combination of requests, regions, error types etc., that we are interested in and quickly find out anomalies. We can also correlate the client-side performance with the server-side metrics to easily identify the bottlenecks.

 

Nagarjuna_V_4-1716145717867.png

 

Nagarjuna_V_5-1716145756019.png

 

We used Locust to create a test script to simulate a user flow on Contoso Traders web application and used that script with Azure Load Testing to test the web app performance. To closely simulate the real time traffic pattern, we used a multi-region load test to generate load from multiple geographies.

Next steps

We also have some interesting updates about the integration of Azure Load Testing with Azure App Service and Azure Functions. Check out these links to know more  

Try out the exciting new features and share your feedback here – https://aka.ms/malt-feedback

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.