Load Testing with Azure and Visual Studio Team Services (VSTS)

Posted by: Gouri Sohoni , on 5/5/2018, in Category Microsoft Azure
Views: 3226
Abstract: Learn how to do Load Test using an Azure Account, how to associate it with VSTS account to store history and how to observe the data.

To ensure that any application works and performs as per the requirements, it is imperative to do testing.

During testing of an application, we try and find if there are any defects remaining in the application. There are many types of testing like unit testing, functional testing, acceptance testing, as well as integration testing. We write Functional and UI tests to find out if the application is working as desired.

Many of the applications under development are web applications or web services. Most of these application now-a-days run for a long duration, for many concurrent users, over many networks and across many browsers. While testing the app, we need to find out the application’s performance by taking it to a real world scenario where there are any number of users, networks, as well as different browsers. This type of testing is called Load Testing.

Load testing helps us give an analysis of performance counters on servers when loaded to the point of actual load and beyond.

Load Testing is similar to Performance Testing which analyzes the application’s performance in real time scenario. This helps in finding out the behavior of an application under different load conditions like multiple users (constant or variable load), multiple browsers, multiple networks. When any user uses the application, he/she may take some time before clicking on any button or link. We can specify this behavior as think times while load testing is performed. We can specify the number of minutes for which the test needs to run.

Visual Studio 2017 offers Load Testing feature with its Enterprise version. It comes in two flavors – Cloud-Based Load Test and On-Premises Load Test. There is indeed one more option with Performance Test feature which is provided by Azure.

In this article, I will discuss how to create a Performance Test using an Azure Account, how to associate it with VSTS account to store history and how to observe the data.

I will discuss the Load Test feature from Test hub for Visual Studio Team Services (VSTS) in an upcoming article.

Load Testing with Azure - Pre-requisites

1. Azure Account. Get a free trial.

2. Use your existing VSTS account or a new one will be created on the fly

3. An Azure app service or application which you can test

4. A Web Performance Test which you can test for additional testing

Azure Account based performance testing can be done in two ways - one is a manual test which will automatically take the url for the running app and the other is by using Web Performance Test file. This Web Performance can be created using Visual Studio 2017 Enterprise.

I have an Azure App Service which runs a small EMS (Employee Management System) application which I am going to use for Performance Testing. Let us see a step-by-step walkthrough of how to perform a Load test on it using Azure.

Azure Account

If you have yet created a new Azure account, please visit this link.

Go to the portal of your Azure Account and select the application to create a Performance test.

Create Performance Test

Select Azure App Service for which you need to create Performance Test and Select ‘Performance Test’ from the menu.

create-performance-test

Select VSTS Account

You can either create a new VSTS account or select an existing one by selecting the Set Account.

select-vsts-account

The subscription and the location are selected for existing accounts.

Run Performance Test

Once the VSTS account is selected, we will first select manual test as performance test.

select-manual-test

The URL gets automatically selected based on the Azure App Service you are using. We can select the duration for the load test to run, as well as the user load. The load is being simulated based on the virtual users which will visit the application you are testing at the same time. This will help us in determining if any requests are failing or are being slowed. Depending on the license you have for Azure Account, you will get number of minutes for different simultaneous uses. Refer this link for more information.

Once the User Load and Duration is selected, click on Run test. The Performance Test will be automatically queued.

performance-test-queues

Select the test and you will see that the resources are being acquired before the execution of the test.

acquiring-resources

Once the wait is over, the test starts its execution and continues for the duration specified. It also takes care of the number of users which you have already set. We can see from the diagram that the test is in progress and capturing all relevant data.

test-in-progress

The performance will be displayed while the test is getting executed.

performance-under-load

View Test Data in VSTS account

Once the test has completed execution we can find all the analytics (charts, summary and logs) in the VSTS account which was set before the execution of the Performance Test.

charts-performance-test

These are the charts which are generated during the Performance Test. As you can see there were no errors generated.

Following is the summary for the test:

performance-test-summary

If there are any warnings or errors, these charts will help in finding out the problems.

Multiple URLs can be tested by associating the test with the web test and not using manual test. (You will have to create a Web Performance Test first using Visual Studio 2017 Enterprise)

perf-test-for-web-test

Observe that the URLs are automatically selected depending on the web test.

Select the User Load and Duration and click on the Run test button. You will get a similar chart for the new performance test. Later when you select the VSTS account, you can observe the two tests shown under Load Test.

tests-under-vsts

Conclusion

In this article I have discussed how a performance test can be created and executed using an Azure Account. In the next upcoming article, I will be discussing in details about the Load Test tab and available features.

Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+
Further Reading - Articles You May Like!
Author
Gouri Sohoni is a Trainer and Consultant for over two decades. She specializes in Visual Studio - Application Lifecycle Management (ALM) and Team Foundation Server (TFS). She is a Microsoft MVP in VS ALM, MCSD (VS ALM) and has conducted several corporate trainings and consulting assignments. She has also created various products that extend the capability of Team Foundation Server.


Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!

Categories

JOIN OUR COMMUNITY

POPULAR ARTICLES

FREE .NET MAGAZINES

Free DNC .NET Magazine

Tags

JQUERY COOKBOOK

jQuery CookBook