Load Test Series Part I: Creating Web Performance Tests for a Load Test


We have been getting a lot of requests for “getting started” type content for Load Testing (3 request this week!) and thought I would create a series to help people get started.

This is the first part of the series on how to get started with Load Testing specifically:

Creating Tests to Load test

Be sure and check out the rest of this getting started with Performance Testing Series series:

    1. Part I Creating Tests to Load test
    2. Part II Creating Load tests
    3. Part III Taking your load test to the Cloud (i.e. creating a Cloud-based Load test)
    4. Part IV Running Load Tests directly from Visual Studio Online
    5. Part V Analyzing the load test reports
    6. Part VI Get application performance data with your Cloud Load Test

 

Most performance engineers will tell you when starting a load testing effort you should start by asking yourself what do you want to learn from your load testing effort.  But at a tactical level you will start your load testing effort creating the tests that you will use in your load test.  Traditionally, to get a true measure of the performance, capacity or speed; tests were performed at the network level.  In Visual Studio these type of tests are called Web Performance Tests.   (in addition to this walk through there is another on at: https://msdn.microsoft.com/en-us/library/aa337591(v=vs.110).aspx)

A recent architecture trend is to supply services through a JSON layer and testing these services can easily be accomplished using Unit Tests (for a information on creating Unit Tests please see: https://www.visualstudio.com/en-us/get-started/code/create-and-run-unit-tests-vs and https://msdn.microsoft.com/en-us/library/ff355993(v=vs.110).aspx)

-Visual Studio Load Testing can use either of these type of Tests when performing a load test.   Below you will find the directions for creating a Web Performance Test.

Step 1. Creating the Project

In Visual Studio Ultimate or in Visual Studio 2015 Enterprise start with File> New Project and select “Web Performance and Load Test Project”

 

image

Step 2. Initiating the web performance test recording

Once you have a the project open you will have an empty Web Test.  To record your actions press the red button.  This should launch Internet Explorer with the recorder panel open.  

image

If this does not happen you will need to open the Manage-add ons in Internet Explorer and enable the recorder.

image

Step 3. Recording the Web Performance Test

With the recorder enabled you would walk through your scenario as you normally would.

image

Step 4. Cleaning up and running the Recording

In many cases your recording will contain noise you don’t want to measure the performance of, such as unneeded Navigation.

To remove a request or field simply select it and hit delete…or right click and delete or change its properties.

image

Congratulations you have created a web performance test!

 

Data binding a Web Performance Test

In most cases you will want a dynamic set of data in your web performance test…in which case data binding is a a great solution.

(more information can be found here: https://msdn.microsoft.com/en-us/library/bb385833(v=vs.110).aspx and here https://msdn.microsoft.com/en-us/library/ms243142.aspx)

Step 1.  Set the value the to be data driven

image

Step 2. Add a data source

By selecting the option to use a data source as a value the Web Performance Test will automatically walk you through a data source wizard.

image

image

Step 3. Data binding the value

Now that you have a data source you can set the value to be a particular column in the data source.

image


Comments (0)

Skip to main content