Azure Tips and Tricks - How to test application performance with Azure Load Testing
How to test application performance with Azure Load Testing
Application performance testing
When you build an application, you want it to be fast. Users should perceive it as fast and performant, even when many users are using it. And your application should continue to work without errors when it is under load. It can be difficult to know how your application behaves when it is used by many concurrent users. Azure Load Testing can help by putting your application under load and analyzing how it performs.
In this post, we'll test the performance of an existing web application with Azure Load Testing.
Prerequisites
If you want to follow along, you'll need the following:
- An Azure subscription (If you don't have an Azure subscription, create a free account before you begin)
- An existing application running in Azure. For instance, a web application running in an App Service Web App.
Test and analyze the performance of a web application
We'll start by creating an Azure Load Testing resource from the Azure portal.
- Go to the Azure portal
- Click the Create a resource button (the plus-sign in the top left corner)
- Search for Load Testing, select the "Azure Load Testing" result and click Create
- Select a Resource Group
- Fill in a Name
- Select a Location
- Click Review + create and then Create
Create an Azure load testing resource
Before we can create a test, we need to create an Apache JMeter script. This is a scripts that tells Azure Load Testing what to test and how to do it. JMeter scripts have the .jmx extension and look like the code here:
This JMeter script simulates a load test of five virtual users simultaneously accessing a web endpoint. It takes less than two minutes to complete. All you need to do to make this script work for you is to replace the string your-endpoint-url with the endpoint of the web application that you want to test, like microsoft.github.io/AzureTipsAndTricks.
Now that we have an Apache JMeter script, we can create a test in the Azure Load Testing resource.
- Navigate to the Azure Load Testing resource in the Azure portal
- Select the Tests menu
- Click on Create new test
- In the Basics tab, enter a Test name
- Click Next: Test plan
- Select the JMeter script that you created and click Upload
- Click Next: Parameters
Upload an Apache JMeter script
- You can enter environment variables and secrets that can be used by the JMeter script. Let's leave this blank and click Next: Load
- We only need one test engine instance to run the test. You can scale this up to increase the threads that will be executed. Click Next: Test criteria
- Here we can create failure criteria that state when the test fails. Let's create one
- For Metric, select Error
- The Aggregate function should be Percentage
- Select Greater than for Condition
- Enter 50 for Threshold. This tells the test that it fails if more than 50 percent of requests fail
- Click Next: Monitoring
- Here, we can indicate Azure services to be monitored during the test. The application that we are testing runs in an Azure App Service Web App, so let's select that
- Click Next: Review + create and then Create to create the test. It will run automatically when it is created
When the test is done, it will show the results in the overview. This includes the load, response time, error percentage and throughput. You can see more details for the Azure services that were monitored by clicking on Additional insights.
The results of the load test
Conclusion
Azure Load Testing helps you to test the responsiveness and resilience of your application when it is under load. You can integrate it into your DevOps pipeline to identify performance regressions, and you can monitor and analyze the Azure services that are under load.
Create a trial account today and go and check it out!
Published on:
Learn moreRelated posts
Powering Real-Time Messaging at Scale with Azure Cosmos DB
Microsoft Teams, Copilot, Azure Communication Services and many other product offerings from Microsoft, rely on a unified messaging platform t...
Azure SQL Cryptozoology AI Embeddings Lab Now Available!
Missed out on MS Build 2025? No worries! Our lab is now available for your exploration. Dive into a unique cryptozoology experience using Azur...
Vector Support Public Preview now extended to Azure SQL MI
We are thrilled to announce that Azure SQL Managed Instance now supports Vector type and functions in public preview. This builds on the mome...
Building Multi-Agent AI Apps in Java with Spring AI and Azure Cosmos DB!
As AI-driven apps become more sophisticated, there’s an increasing need for them to mimic collaborative problem solving – like a t...
What runs ChatGPT, Sora, DeepSeek & Llama on Azure? (feat. Mark Russinovich)
Build and run your AI apps and agents at scale with Azure. Orchestrate multi-agent apps and high-scale inference solutions using open-source a...
Azure Cosmos DB TV – Everything New in Azure Cosmos DB from Microsoft Build 2025
Microsoft Build 2025 brought major innovations to Azure Cosmos DB, and in Episode 105 of Azure Cosmos DB TV, Principal Program Manager Mark Br...
Azure DevOps with GitHub Repositories – Your path to Agentic AI
GitHub Copilot has evolved beyond a coding assistant in the IDE into an agentic teammate – providing actionable feedback on pull requests, fix...