Adding Performance/load test to Azure Web and Mobile App Continuous Deployment

Update: A new blog post with a full fledged UI to support the below scenario can be found here – Performance testing with App Service Continuous Deployment

Back in September, we introduced a capability of Performance/Load testing with App Service Plan.  You can measure the number of users your app can take before going into the production. You can access this functionality from the Tools menu as shown below:

You can read more about the announcement here.

So, for every deployment you do on the web app, you might like to verify the performance of your web app and see if it is going to meet your business SLAs around performance and page load time. To make this process easy, we have integrated Performance testing with Continuous Deployment.

One of the coolest features of Microsoft Azure Web Apps is to deploy to the Web App automatically using different source control systems in a continuous deployment fashion

[ Introduction to Deploying an App to Azure App Service – This link gives an overview of deployment process and various options to do continuous deployment using GIT, Visual Studio Team Service and many other Source Control Systems.]

The next logical step post deployment of a web site would be to run some tests like unit tests (this link talks about adding custom scripts) and Performance tests.

In this article we will cover how to go about enabling Performance tests post the deployment process.

In order to enable Performance test, you need to:

  1. Create a Visual Studio Team Services (VSTS) Account – Click Here to create one
  2. A PAT token for your VSTS account. Generate a PAT following the instructions here . You can choose the Scope as All for now (but limit it to just Load Test Read/Write when Available)

Follow the below steps to enable Performance test as part of Continuous Deployment:

  1. Log in to http://portal.azure.com
  2. Navigate to App Services -> Your Web App/App Service -> Settings -> Continuous Deployment

 

  1. Configure Continuous Deployment (CD) with source control of your choice for a web App
  2. Once you have configured CD, Click on “App Settings” in the Settings Blade and add the below two settings (Key: Value):
    1. VSTS_PERF_TEST_CONFIG: {“TESTNAME”:”<The Name of the performance test>”,”GEO”:”<Location from where you want to initiate the load test run>”,”DURATION”:<Run Duration in Seconds, minimum 60 >,”URL”:”<Url endpoint which you want to load test>”,”VULOAD”:<Number of virtual users/concurrent users to run the load test>,”PAT”:”<PAT token of your VSTS Account>”,”VSTSURL”:”https://<YourVSTSAccount>.visualstudio.com”}
    2. PERFORMANCETESTING_EXTENSION_VERSION: latest
  3. Once these settings are configured, Push new changes to the configured Source Control branch.
  4. You should see a “Performance test” being executed a post deployment command

 

Please try out the above steps and let us know your experience. You can reach us at vsoloadtest@microsoft.com for any questions

PS: We are working on building a great experience to make all these steps seamless :). Watch out this space for more announcements.