Azure Cloud Load Testing – Part 2


Guest Post by Ahmed Al-Asaad

In the previous blog post, I showed how easy it is to initiate a load test from Azure by just providing a URL of the web page you want to load test, specify the number of users and the duration. This is great for websites where requests are GET requests or you are not trying to test a user scenario that consists of multiple steps. In this post, I will show how to use Azure Cloud Load Testing in a more advanced scenario that consists of multiple steps.

Prerequisites

In order to record a performance test which will be used for load testing, you need to have Visual Studio Enterprise or Ultimate Edition. You can download a 30 day trial version

Recording a Scenario

· Open Visual Studio

· Create a new Web Performance and Load Test project

clip_image002

· Click the record button on your web test

clip_image004

· Go through the scenario you want to record. I uploaded the scenario I recorded at https://youtu.be/6-ZiIL7yPpA 

· I recorded a test to go from the home page to the search page and then perform a search

clip_image006

You can test your script by clicking the run test button

clip_image008

Create a Load Test

A load test can consist of one or more test scenario. You can also define the duration of your test and the number of users to simulate running the test. Let’s create and configure a load test which will run in Azure.

· Right click on your project

· Add a load test by right clicking on the project and add a new itm

clip_image010

· On the wizard, I am selecting a Cloud-based Load Test and click next

clip_image012

· Select the location where the load will be generated from and click next

clip_image014

· On the Run Settings page, you select the duration of the run and then click next

clip_image016

· On the scenario page, name the scenario and select the Think time profile, think time is the duration between your test steps

clip_image018

· On the Load pattern page, you can select a constant load of users or if you want to start with a smaller number of users and ramp up the user users while your test is running. I am using a constant load but you may want to use the second option if that what you want to simulate.

clip_image020

· On the test mix page, you can select one or more tests. in my case I am only selecting one web test. You can also selected MSTest unit tests as well.

clip_image022

· Add the browsers you want your users to use during the test

clip_image024

· Click the Run load test button

clip_image026

· Click on the Performance or Throughput buttons to see the graphs. The application button with capture the Application Insights telemetry

clip_image028

Conclusion

In this post, I showed how to create a performance and load test using Visual Studio 2015 Enterprise Edition and leverage Azure Cloud Load Testing to execute the recorded test. I didn’t have to create any Virtual Machines or install test agents to run my load test. I had to push a button and monitor the test run. Cloud load testing would save you a lot of money in infrastructure purchases and labour costs when you want to run load tests to similar millions of users and you want to only run the test scenarios for few weeks a year. The first 20,000 Virtual User Minutes (VUMs) a month are free. Give it a try today.

 

Originally Posted on lajak.wordpress.com

blog (lajak.wordpress.com

Comments (0)

Skip to main content