Quickstart: Create and run a load test with Azure Load Testing Preview
This quickstart describes how to load test a web application with Azure Load Testing Preview from the Azure portal without prior knowledge about load testing tools. You'll first create an Azure Load Testing resource, and then create a load test by using the web application URL.
After you complete this quickstart, you'll have a resource and load test that you can use for other tutorials.
Learn more about the key concepts for Azure Load Testing.
- An Azure account with an active subscription. Create an account for free.
- Azure RBAC role with permission to create and manage resources in the subscription, such as Contributor or Owner
Create an Azure Load Testing resource
First, you'll create the top-level resource for Azure Load Testing. It provides a centralized place to view and manage test plans, test results, and related artifacts.
If you already have a Load Testing resource, skip this section and continue to Create a load test.
To create a Load Testing resource:
Sign in to the Azure portal by using the credentials for your Azure subscription.
Select the menu button in the upper-left corner of the portal, and then select + Create a resource.
Use the search bar to find Azure Load Testing.
Select Azure Load Testing.
On the Azure Load Testing pane, select Create.
Provide the following information to configure your new Azure Load Testing resource:
Field Description Subscription Select the Azure subscription that you want to use for this Azure Load Testing resource. Resource group Select an existing resource group. Or select Create new, and then enter a unique name for the new resource group. Name Enter a unique name to identify your Azure Load Testing resource.
The name can't contain special characters, such as \/"":|<>+=;,?*@&, or whitespace. The name can't begin with an underscore (_), and it can't end with a period (.) or a dash (-). The length must be 1 to 64 characters.
Location Select a geographic location to host your Azure Load Testing resource.
This location also determines where the test engines are hosted and where the JMeter client requests originate from.
Optionally, you can configure more details on the Tags tab. Tags are name/value pairs that enable you to categorize resources and view consolidated billing by applying the same tag to multiple resources and resource groups.
After you're finished configuring the resource, select Review + Create.
Review all the configuration settings and select Create to start the deployment of the Azure Load Testing resource.
When the process has finished, a deployment success message appears.
To view the new resource, select Go to resource.
Optionally, manage access to your Azure Load Testing resource.
Azure Load Testing uses role-based access control (RBAC) to manage permissions for your resource. If you encounter this message, your account doesn't have the necessary permissions to manage tests.
Create a load test
Azure Load Testing enables you to quickly create a load test from the Azure portal. You'll specify the web application URL and the basic load testing parameters. Azure Load Testing abstracts the complexity of creating the load test script and provisioning the compute infrastructure.
Go to the Overview page of your Azure Load Testing resource.
On the Get started tab, select Quick test.
On the Quickstart test page, enter the Test URL.
Enter the complete URL that you would like to run the test for. For example, https://www.example.com/login.
(Optional) Update the Number of virtual users to the total number of virtual users.
The maximum allowed value is 11250. If the number of virtual users exceeds the maximum of 250 per test engine instance, Azure Load Testing provisions multiple test engines and distributes the load evenly. For example, 300 virtual users will result in 2 test engines with 150 virtual users each.
(Optional) Update the Test duration and Ramp up time for the test.
Select Run test to create and start the load test.
Azure Load Testing auto-generates an Apache JMeter script for your load test. You can download the JMeter script from the test run dashboard. Select Download, and then select Input file. To run the script, you have to provide environment variables to configure the URL and test parameters.```
View the test results
Once the load test starts, you will be redirected to the test run dashboard. While the load test is running, Azure Load Testing captures both client-side metrics and server-side metrics. In this section, you'll use the dashboard to monitor the client-side metrics.
On the test run dashboard, you can see the streaming client-side metrics while the test is running. By default, the data refreshes every five seconds.
Optionally, change the display filters to view a specific time range, result percentile, or error type.
Modify load test parameters
You can modify the load test configuration at any time. For example, define test failure criteria or monitor server-side metrics for Azure-hosted applications.
In the Azure portal, go to your Azure Load Testing resource.
On the left pane, select Tests to view the list of load tests, and then select your test.
Select Edit to modify the load test configuration.
The generated load test uses environment variables to specify the initial configuration:
domain: Domain name of the web server (for example, www.example.com). Don't include the
protocol: HTTP or HTTPS
path: The path to the resource (for example, /servlets/myServlet).
threads_per_engine: The number of virtual users per engine instance. It is recommended to set this to maximum 250. If you need more virtual users, increase the number of test engines for the test. For more information, see how to configure for high scale.
duration_in_sec: Test duration in seconds
ramp_up_time: Ramp up time in seconds for the test to reach the total number of virtual users.
Clean up resources
You can reuse the Azure Load Testing resource that you created for other Azure Load Testing tutorials and how-to articles.
If you don't plan to use any of the resources that you created, delete them so you don't incur any further charges. If you've deployed the sample application in a different resource group, you might want to repeat the following steps.
To delete resources by using the Azure portal:
Select the menu button in the upper-left corner, and then select Resource groups.
From the list, select the resource group that you created.
Select Delete resource group.
Enter the resource group name. Then select Delete.
To delete resources by using the Azure CLI, enter the following command:
az group delete --name <yourresourcegroup>
Remember, deleting the resource group deletes all of the resources within it.
You now have an Azure Load Testing resource, which you used to load test an external website.
You can reuse this resource to learn how to identify performance bottlenecks in an Azure-hosted application by using server-side metrics.
Submit and view feedback for