Migrating and Deploying a Simple Cloud App: Part 5 - Testing Locally

Deploying-a-Simple-Application_thumb[2]

If you’ve started reading from this post, you’ll need to go through the previous parts of this series before going starting this one:

Introduction
Part 1: Setting Up a SQL Azure Server and Database
Part 2: Scripting the On-Premise Database for SQL Azure
Part 3: Executing the Scripts on the SQL Azure Database
Part 4: Creating the Cloud Solution

Almost there! We’re going to do some local testing to make sure everything is working before we deploy it to Windows Azure. When testing locally, Visual Studio will start up the components of the Development Fabric, which include the compute and storage emulators.

  • The compute emulator emulates Windows Azure on your local computer. It enables you to run and test your application before you deploy it as a hosted service to Windows Azure.
  • The storage emulator emulates Windows Azure Storage, providing local blob, queue, and table storage. It enables you to ensure that your application is correctly using the storage entities before you deploy it to Windows Azure.

Testing the Solution

  1. Press F5 to build and run the solution. Visual Studio is going to work for a bit creating the package and deploying it to the development fabric. Eventually, Internet Explorer will come up with the Nerd Dinner web application.

    Don’t be fooled! Just because the home page rendered, doesn’t mean everything is working. The home page doesn’t query the database, so there isn’t really anything that can’t work on this page.  To truly check if everything is working, click on View All Upcoming Dinners which does make a call to the database and returns dinners (if any). If no error comes up, then everything is good.

    image

  2. Close the Internet Explorer window to return to Visual Studio and end the application.

Your testing is now complete. Were you looking for something more complicated? In this case, we know the application itself works. We just needed to test the modifications that we made.

If you’d like to read more about the emulators and the local Development Fabric, have a read through:

With the testing completed, next up is preparing the deployment package.