When deploying web app to Azure, one of the key design considerations is around load planning. Normally this is calculated on expected concurrent connections and resource requirements for the application. One of the great features that Microsoft offer is the ability to configure comprehensive load testing which can give a really quick and simple visual representation of how the deployed web app functioned under predetermined loads.
As with most things in Azure, its possible to author tests in a number of ways including Visual Studio, Visual Studio Team Services (VSTS) and using the Azure Portal. For the purposes of this article, I will be focusing on how quick and simple it is to setup such a load test through the Azure Portal.
- Azure subscription
- Web app to test
- Team Services account
I’m going to assume that an Azure subscription is in place and that a web app has already been deployed so the only other requirement is that of the Team Services account.
This can be provisioned in one of two ways:
- Automatically created during the setup of the performance test
- Manually created in advance
Linking the Team Services account
1. To set the Team Services account, browse to the web app and expand its properties.
2. Next, scroll through the menu and select Performance Test.
3. Finally, click on the Set Account button and either select a Team Services account that already exists or create a new one.
To create a new account, click on Or Create New from the next window.
Configuring the performance test
1. After the Team Services account has been set, the next step is to create a new test. To do this, firstly click on the + NEW button.
2. Next click on Configure test using, choose the test type and make sure the URL is of the website that the test should be run against.
There are two different types of test to choose from:
- Manual Test
- Visual Studio Web Test
The manual test allows you to run the performance test against a single URL where as the Visual Studio Web Test makes it possible to incorporating multiple URLs that represent an end-to-end user scenario.
Other settings that can be configured include the number of concurrent users to simulate and the duration the test should run over.
Once created, the test will appear in the list of Recent runs.
Double clicking on the test opens a new blade with a graphical view of its current state and how the test is progressing.
Once the test has completed, the results will be displayed in various formats. The Requests panel shows the total number of requests sent, with the breakdown between successful and failed attempts. By clicking on this box allows you to drill down further into the failure details.
It’s possible from this view to see exactly the type of failure, any context associated with each error and also the number of times each failure occurred.
For more details checkout the Microsoft document site https://docs.microsoft.com/en-us/vsts/load-test/overview