Building Windows Azure Service Part7: Service Testing
In this post, you will test the GuestBook application in the Development Fabric (aka, devfabric). The devfabric is a simulated environment for developing and testing Windows Azure applications on your test machine.
A Visual Studio project with source code is available at the end of this post to accompany the subject matter discussed.
In Visual Studio, press F5 to execute the service. The service builds and then launches the local development fabric. To show the development fabric UI, right-click its icon located in the system tray and select Show Development Fabric UI.
Figure 9 Development Fabric UI
Switch to Internet Explorer to view the GuestBook application.
Add a new entry to the guest book as described in the next steps.
Type your name and a message.
Choose an image to upload. It is a good idea to choose a large high resolution image because the guestbook service will resize it.
Click the pencil icon to submit the entry.
Figure 10 GuestBook Home Page
Once you submit an entry, the web role creates a new entry in the guest book table and uploads the photo to the Blob Storage. The page contains a timer that triggers a page refresh every 5 seconds, so the new entry should appear on the page after a brief interval.
Initially, the new entry contains a link to the blob that contains the uploaded image so it will appear with the same size as the original image.
Figure 11 GuestBook Image Original Size
After a few seconds, the page refreshes and displays the thumbnail that the worker role generated.
Figure 12 GuestBook Generated Thumbnail
For related topics, see the following posts.
- Building Windows Azure Service Part1: Introduction
- Building Windows Azure Service Part2: Service Project
- Building Windows Azure Service Part3: Table Storage
- Building Windows Azure Service Part4: Web Role UI Handler
- Building Windows Azure Service Part5: Worker Role Background Tasks Handler
- Building Windows Azure Service Part6: Service Configuration