Load test your app in the cloud using Visual Studio and Azure DevOps

Azure Test Plans

Note

While Azure DevOps cloud-based load testing service is deprecated, Azure Load Testing Preview is available. Azure Load Testing Preview is a fully managed load testing service that enables you to use existing Apache JMeter scripts to generate high-scale load. To learn more, see What is Azure Load Testing Preview?. To learn more about the deprecation of Azure DevOps load testing and other, alternative services see Changes to load test functionality in Visual Studio and cloud load testing in Azure DevOps.

Check your app or web site's performance before you launch it or deploy updates to production by using load testing. Find problems before your customers do. Start running cloud-based load tests in almost no time with Azure DevOps.

This example shows how to execute a cloud load test using Visual Studio. You can also run cloud-based load tests directly using the Azure DevOps portal, or run load tests locally with Visual Studio.

Prepare your environment

  • Download and install Visual Studio Enterprise, if you don't already have it.

  • Create an Azure DevOps subscription, if you don't have one already. You can have any access level assigned to you in Azure DevOps when you use Visual Studio Enterprise to run load tests.

  • If you don't have a load test project, use our sample load test project with your web site or app. Just provide the address for the web site that you want to test. Or, if you have a load test project, jump ahead to connecting to Azure DevOps to run the load tests.

Get the sample load test project

  1. Download the sample load test project, unblock the zip file in its Properties dialog, and unzip the files into a local folder on your computer.

  2. Open the GettingStartedWithLoadTesting.sln solution in Visual Studio Enterprise.

  3. Open the SampleWebTest.webtest file. Replace the URL with the URL of your app's web page.

    Open SampleWebTest.webtest. In Properties window, replace URL with your web page address

Connect to Azure DevOps

Before you can run load tests in the cloud, connect Visual Studio to Azure DevOps.

  1. In Team Explorer, connect to Azure DevOps by first choosing the "connect" icon.

    Connect to Azure DevOps

  2. Connect to one of your projects by opening the server name in the list and double-clicking on the project name.

    Select Projects

    • If you haven't connected to Azure DevOps before, add it to the server list. Start by choosing the Manage servers link to open the connection dialog.

      Click Servers to add your Azure DevOps subscription

    • Enter your Azure DevOps server URL.

      Enter your subscription name

    • If you're prompted to sign in to Azure DevOps, do that now.

  3. Select your Azure DevOps subscription from the list, then choose your project. Now you can connect.

    Choose your project

Run and analyze your load test

  1. In Solution Explorer, open the load test that you want to run.

    Solution Explorer: double-click your load test

  2. To run your test closer to where your users are, select a location closer to your users.

    Edit load test to set location

    Select location

  3. Now run your load test. This will run in the cloud using Azure DevOps.

    On the load test toolbar, click Run

    Your test appears in the queue and waits for its turn to run. When Azure DevOps is ready to run your test, the test status changes to "Acquiring resources".

    Your load test appears in the queue

    A large test run might take up to 10 minutes while Azure DevOps sets up virtual machines and agents for you.

  4. You can watch your app's performance while the test runs. Look at the details to review errors, warnings, or other information about your test.

    Running your load test show the performance

  5. When the test is done, download the report to view the results.

    Click Download to save the report

    Click View Report to view results

    The results include performance counter data, threshold violations, and error information.

  6. Review your test's details. Find the number of users where your app's performance fails to meet your requirements by examining the step load pattern for virtual users.

    View load test run details

  7. Fix any performance issues that you find in your app's code, then rerun the test.

  8. To simulate real-world loads more closely, you can refine your test by specifying web performance test properties, load test scenario properties, and run settings properties.

Next step