DEV Community

Cover image for Azure Load Testing (PaaS) using Apache JMeter
Martin
Martin

Posted on

Azure Load Testing (PaaS) using Apache JMeter

Overview

Azure Load Testing is a new managed load testing service from Microsoft (currently in preview) that lets you simulate volumes of traffic to your website regardless of where you are hosting your application. It uses Apache JMeter to both define and run the loads tests.

This can be specifically useful if you have a website that needs to scale on demand to meet peak performance requirements. Microsoft seem to be adding more abstraction layers in Azure which is nice to see and previously you would have to run these JMeter tests on your own compute environment or virtual machines.

Image description

In this article we are going to look at how you can create a sample load testing in the portal. The service is currently in preview and it seems like only manual deployment through the portal is available. There is also a comprehensive guide from MS on how you can can automate the load testing through CI/CD using Github actions so I won't be repeating something that is already well documented.

Create the Load Testing Service

Step 1: Navigate to the Azure marketplace and search for "Azure Load Testing". You can also try the following link after you have logged into the portal.

Step 2: Fill out the required details. In my case I set up a new resource group for the service and click "create".

Image description

Step 3: Navigate to the service once it's deployed. It should spin up in a few minutes.

Image description

Create the Load Test and View the Results

For the purposes of this demo we are going to set up one of the out the box tests which will hit an endpoint we specify. You can optionally upload your own JMeter scripts.

Step 1: Navigate to the "tests" blade in the left pane

Image description

Step 2: Input the required parameters. Here you can specify how many users you would like to simulate the load for, the test duration and the ramp up time for the virtual users. For the purposes of this demo we are going to load www.google.co.uk.

Image description

Step 3: The test will start running and it should complete based on the duration specified in the previous step:

Image description

Step 4: Once the test completes you can navigate over and analyse the results:

Image description

You can optionally export the results. For this test we defined no pass criteria so the test result will display as "not applicable".

Conclusion

This is certainly a neat new service to see from Microsoft. The big issue with load testing is having to spin up compute to execute your tests and then integrating this into your CI/CD from scratch. A lot of this friction is removed with this service.

This is only a fraction of the functionality so be sure to check out the Microsoft docs for more info.

Microsoft also provide full CI/CD integration for Azure load testing using Github actions meaning you can automatically run these tests when creating a PR (or any other trigger) and define pass/fail criteria which embeds load testing into the core of the software development lifecycle. I can also see a use for this when deploying infrastructure changes through IaC where changing the sizing of your compute may impact the performance when under high load.

Top comments (0)