Export (0) Print
Expand All

Run performance tests on your app

Visual Studio 2013

Use load testing in Visual Studio Ultimate to find performance issues before you release your app.

Don’t want to use your resources and set up your own machines to create this load? You can use cloud-based load testing to provide virtual machines in the cloud that generate the load of many users accessing your web site at the same time. All you need is a Visual Studio Online account. Learn more about this cloud-based load testing service that provides 15,000 free virtual user minutes of load testing every month.

To load test your app with on-premises resources or using cloud-based load testing, you first create web performance tests. These tests are used in your load tests to simulate multiple users performing actions in your app at the same time.

  1. If you don’t have Visual Studio Ultimate, get it here.

  2. Create a web performance and load test project.

    Create Web Performance and Load Test project

  1. Create a web performance test.

    Create web performance test

    Your web browser opens.

  2. Enter the url for the website that you want to test.

    Enter url - web test recorder automatically starts

  3. Use your application like you expect your customers to use it. For example, search for items and add them to the shopping cart.

    The recorder will capture the HTTP requests and responses.

  4. When you’re done, stop recording.

    Use your application as user would, stop recording

    Now, Visual Studio looks for dynamic parameters for the HTTP responses to each of your HTTP requests. A progress bar is displayed while this happens.

    If dynamic parameters are found, a table appears. It lets you assign constant values to each of the dynamic parameters.

  5. Rename your test. For example, ShoppingCart.webtest.

    Rename web performance test

  6. Edit test properties to specify performance goals. For example, you can set a page response time goal to 1 second.

    Edit page response time goal property to 1 second

  7. Save the test.

  1. Create a new load test in the web performance and load test project.

    Create new load test

  2. When the load test wizard appears, choose the load pattern step.

    Change the load pattern to step load. This gradually adds users over time.

    Configure the step pattern

  3. Choose the test mix step.

    New Load Test Wizard - Test Mix page

    Add the web performance test you created.

    Add tests to the test mix

    Move the web performance test to the list of tests to run.

    Select which tests to include in the test mix

  4. When you finish the wizard, the web performance test is added to the load test and appears in the load test editor.

    Load test editor

You can run your load test locally, or you can run it in the cloud using Visual Studio Online. All you need is a Visual Studio Online account. If you run the load test in the cloud, you can generate more load without setting up test controllers and test agents. To learn how easy it is to use cloud-based load testing to run your load tests, go here.

Follow these steps to run your load test on your local machine.

  1. Run the load test.

    Run a load test from toolbar

    The test starts running.

  2. While the test is running, you discover that the shopping cart page response time exceeds the value you set.

    Analyzing page response time issue

    Add an analysis note to track the issue.

    Add an analysis note during test

    After the load test is finished, the summary is displayed.

    The results for the completed test include performance counter data, threshold violations, and error information.

    Load test summary

  3. Choose the detail view. By analyzing the step load pattern for users, you can identify the user count where your performance fails to meet your requirements.

    Detail view with step load pattern

    Fix any performance issues in your application’s code and rerun the test.

A: You can use cloud-based load testing service which allows you to run your tests across multiple virtual machines in the cloud. You can also use an on-premises test controllers and test agents. See Create and run a load test [redirected].

Using a test controller and agents is not supported using the Visual Studio Ultimate Trial version.

A: In the full version of Visual Studio Ultimate, the number of virtual users is unlimited. However, if you need to emulate thousands of users, use test controller and test agent machines.

In Visual Studio Ultimate Trial version, the virtual user count is limited to 250.

A: Yes, the open and manage results button Manage results toolbar button in the load test editor. You can have multiple tests open at the same time to compare runs, and create trend analysis reports comparing them. .

A: Yes, these are the differences:

  • Performance counters   A smaller subset of the performance counter data is available while a test is running.

  • Views   When the load test run has completed, the Summary View and Details View are available.

A: Yes, you can specify think times to simulate the time spent by a user on a web page.

A: If you don’t want to set up machines for load testing, or you don’t have available resources, you can use the cloud-based load testing service. It sets up virtual machines in the cloud that will run your load test. Note that your web site must be publicly available on the internet for load testing using Visual Studio Online to access it.

Show:
© 2014 Microsoft