Testing Applications in Windows Azure

Testing Applications in Windows Azure

Test On-Premise

  • Most but not all of the functional testing can be done on-premise running the cloud application in Compute Emulator
  • Most but not all of the functional testing can be done on-premise on Storage Emulator
  • Most but not all of the database testing can be done on an on-premise SQL Server R2 instance

Code Coverage

Test Early In-Cloud

  • Test the deployment in cloud as early as you can because the first deployment is always tricky.

Test Scenarios specific to Cloud

  • Concurrency: Most of the times, your application will run with multiple roles accessing the same resource like Database. Hence it’s important to test for concurrency and deadlock.
  • Configuration changes: If you change the value of a setting in the configuration file of an already deployed service, the service isn’t restarted. If you are storing the value of a setting in a variable which gets initialized in the constructor, this value will not be updated. Hence you will be always reading stale values. It’s always better to read from the settings at any time instead of a local variable.
  • Capacity Panning: You can scale out any time on runtime after the deployment by increasing the number of role instances. But you cannot scale up on runtime and requires redeployment. Hence it’s important to choose the right VM instance size http://www.microsoft.com/windowsazure/features/compute/
  • Topology: You can improve your performance and reduce your billing by deploying both the Hosted Service and the SQL Azure Database in the same data center. You should also choose the data center which is close to your customers.
  • Confidentiality: If you are developing a confidential application, one of the things you can do is to never deploy on the Production slot until you are ready to be live. You can deploy on the staging slot which will generate a  random url which is not easily discoverable.
  • Rollback: Always deploy your newer version on a staging slot and then VIP swap it with the production slot which has the older version. This way you will always have the older version on the staging slot in case you need to rollback.
  • Failover: You should be prepared for situations where your dependent services might go down even though they have a strict SLA. Hence have a failover hosted service and database in a different datacenter in case of disaster recovery.
  • Platform Upgrades: Since you don’t own the platform, some upgrades might potentially break you. Hence it’s important have continuous integration so that you test your application on a regular basis.

Automate Deployment

  • Automate your On-Premise and Cloud Deployment.

Continuous Integration

  • Building and packaging cloud projects is possible by passing the parameter /t:publish to msbuild
  • Deployment can be automated by following the steps mentioned above. You just need to call the scripts from your Lab Environment
  • Automated test can be created in Visual Studio and added to the Microsoft Test Manager

In-Cloud Performance Testing

  • Don’t perform load testing from an on-premise test rig because it incurs cost.

SQL Azure Performance Tuning

  • Since SQL Profiler is not available for SQL Azure, getting performance insights for queries is difficult.
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
  • Hi Anuj,

    Very nice article to get started . For on-premise azure testing how can we how we can setup the test environment to run automated function testing . Is Azure SDK provides any test harness to run automated functional test?



  • Great collection!

  • Thanks Guys!

    Hi Suresh - For setting up the the test environment on dev fabric, the csrun commandline tool can be used, see msdn.microsoft.com/.../gg433001.aspx . The test harness remains the same for applications hosted in cloud or on-premise. Visual studio unit tests, web tests and coded ui tests can be used for automated functional testing.

  • Nice overview

Page 1 of 1 (4 items)