This post is about how you can use tooling test your cloud based services
Writing client code to test backend services introduces another level of testing
You end up testing both the client and the server
The secret to testing the service tier is to use 3rd party tools
Chrome's Advanced Rest Client and Fiddler are two examples
Used to get a Shared Access Signature
A mobile services account could be used to host a Node.js application that provides shared access signatures to raspberry pi devices
The shared access signature is needed by the raspberry pi, so that it can directly and securely upload photos to Azure storage
We have related posts that shows how Node.js can be used to provide Shared Access Signatures (SAS)
Advanced REST client can be used to test this
See Figure 1
The SAS token can be used to upload photos
Figure 1: Chrome's Advanced Rest Client doing a GET request to get a shared access signature from Azure mobile services
Used to test the shared access signature obtained in the previous step
Will result in a photo getting uploaded using the shared access signature
Figure 2 illustrates:
I just could not get Advanced REST Client to do this part. It sent an incorrect Content-Length regardless of what I tried.
Figure 2: Fiddler issuing a PUT request to upload a photo to Azure Storage
Visual Studio can show us the uploaded image
You can see the following:
Figure 3: Viewing Azure Storage to verify a photo upload
It is very simple to use proxies and test clients like Advanced Rest Client and Fiddler. Both products are free and can be found easily.
These tools eliminate some potential challenges when testing back end services.