Load test with the Azure portal


Check your web app's performance before you launch it or deploy updates to production. That way, you can better assess whether your app is ready for release. Feel more confident that your app can handle the traffic during peak use or at your next marketing push.

Prepare your environment

  • You'll need an Azure subscription. You can get one free through Visual Studio Dev Essentials.

  • You'll need a Visual Studio Team Services (VSTS) account to keep your performance test history. A suitable account will be created automatically when you set up your performance test. Or you can create a new account or use an existing account if you're the account owner. What else can I do with a VSTS account?

  • Deploy your app for testing in a non-production environment. Have your app use an App Service plan other than the plan used in production. That way, you don't affect any existing customers or slow down your app in production.

Set up and run your performance test

  1. Sign in to the Azure Portal. To use a VSTS account that you own, sign in as the account owner.

  2. Go to your web app.

    Go to Browse All, Web Apps, your web app

  3. Go to Performance Test.

    Go to Tools, Performance Test

  4. Now you'll link a VSTS account to keep your performance test history. If you have a VSTS account to use, select that account. If you don't, create a new account.

    Select existing VSTS account, or create a new account

  5. Create your performance test. Set the details and run the test. You can watch the results in real time while the test runs.

    For example, suppose you have an app that gave out coupons at last year's holiday sale. This event lasted 15 minutes with a peak load of 100 concurrent customers. You want to double the number of customers this year. You also want to improve customer satisfaction by reducing the page load time from 5 seconds to 2 seconds. So, you can test your updated app's performance with 250 users for 15 minutes.

    You simulate load on your app by generating virtual users (customers) who visit your web site at the same time. This will show how many requests are failing or responding slowly.

    Create, set up, and run your performance test

    • Your web app's default URL is added automatically. You can change the URL to test other pages (HTTP GET requests only).

    • To simulate local conditions and reduce latency, select a location closest to your users for generating load.

    Here's the test in progress. During the first minute, the page loads slower than is required.

    Performance test in progress with real-time data

    After the test is done, you can see that the page loads much faster after the first minute. This helps identify where you might start troubleshooting the problem.

    Completed performance test shows results, including failed requests

Test multiple URLs

You can also run performance tests incorporating multiple URLs that represent an end-to-end user scenario by uploading a Visual Studio Web Test file. Some of the ways you can create a Visual Studio Web Test file are:

To upload and run a Visual Studio Web Test file:

  1. Follow the steps above to open the New performance test blade. In this blade, choose the CONFIGFURE TEST USING option to open the Configure test using blade.

    Opening the Configure load testing blade

  2. Check that the TEST TYPE is set to Visual Studio Web Test and select your HTTP Archive file. Use the folder icon to open the file selector dialog.

    Uploading a multiple URL Visual Studio Web Test file

    After the file has been uploaded, you see the list of URLs to be tested in the URL DETAILS section.

  3. Specify the user load and test duration, then choose Run test.

    Selecting the user load and duration

    After the test has finished, you see the results in two panes. The left pane shows the performance information as a series of charts.

    The performance results pane

    The right pane shows a list of failed requests, with the type of error and the number of times it occurred.

    The request failures pane

  4. Rerun the test by choosing the Rerun icon at the top of the right pane.

    Rerunning the test

Next step