Load Testing SharePoint 2013 Site

In this article we can explore the feature in Visual Studio 2012 Ultimate for Load Testing a SharePoint 2013 site.

What Load Testing is

Load testing is the process of placing a demand on a system or device and measuring its response.

For example, we can test a SharePoint Site by simulating a load of 100 users at the same time. We can measure the response and possible errors to validate the load-capacity of the servers(s) and measure the performance, scalability, endurance and volume.

Load Testing

Who Performs Load Testing

Often load testing is performed by Automation Testers on a pre-configured test environment with the same topology as the production system.

What is the Configuration needed?

Often load testing is performed by Automation Testers on a pre-configured test environment with the same topology of the production system.

What we can infer from the results

We can use the results for Capacity Validation for improving the Capacity Planning.

For example, if the expected response time is 3 seconds for 500 users / minute, and the test result is showing 5 seconds then surely we need to optimize the server (s) or change the topology based on the bottlenecks.

Load Testing helps us to validate and improve performance yielding maximum productivity from the system.

What is the version of Visual Studio 2012 required for Load Testing?

Visual Studio 2012 Ultimate is required for doing Load Testing.

Visual Studio 2012 Ultimate

You can get a trial download from here.

Simple Load Testing

To perform a simple load test, please use the following procedure.

Step 1: Create a new project.

Create a new project of type Web Performance and Load Test Project.

Create a new project

You will get the following screen.

screen

Step 2: Start recording.

Recording is the process of teaching Visual Studio about our activity. The browser will be launched and the URL entry, mouse clicks and keyboard entries will be recorded. The recording will be used for playback later.

Click on the Start Recording button as highlighted above. You will get the following browser window.
 
Start Recording button

Type the URL and enter the credentials information.

Step 3: Stop recording.

You can see the left pane logs all the requests for pages and scripts. Click the Stop button to stop recording. We are just testing a simple home page load scenario.
 
Stop Recording

Visual Studio will try to find the dynamic parameters like text box entries. The dynamic parameters should be replaced with on-the-fly unique values to avoid duplication.
 
dynamic parameters

For the moment we do not have any dynamic parameters. You should be getting similar results as the following in Visual Studio.
 
Visual Studio

Step 4: Stop recording.

You can delete all the URLs except one.

delete all the URLs except one

Step 5: Add a loop.

We are now adding a loop of 10 counts to the preceding test. Right-click on the URL node and choose the Add Loop option.
 
Add Loop

In the appearing dialog box choose Counting Loop and enter the property as 10.
 
Counting Loop

Click the OK button to save the changes and you will see the new loop item as shown below.
 
save changes

We will try a loop of 10 times to ensure proper page response within 3 seconds.
 
Note

Please note that 3 seconds is a standard measure of page response time.

Step 6: Play the recording.

Choose the Run Test option from the menu.
 
Play Recording

You can see the test will be executed 10 times and the result will be similar to the following.
 
result

You can see that the average response time is less than 3 seconds. This concludes our simple test scenario.
 


The preceding is a simple test scenario. Once you gain confidence, you can go for higher levels like:
  1. Opening list pages, clicking new item, entering data, clicking save, changing dynamic parameters
  2. Testing against production-topology simulated environments
  3. Testing with simulated user volume
  4. Passing Credentials
  5. Using various load-testing options available in Visual Studio

References

Web performance and load testing SharePoint 2010 and 2013 applications

Summary

In this article we have explored an overview of Simple Load Testing of SharePoint sites. I hope this will help you gain the grounds for advanced real world scenarios.

Up Next
    Ebook Download
    View all
    Learn
    View all