Update testing your Windows Phone 7 apps

Testing your Windows Phone 7 apps is pretty straightforward in general. The tools support is great, the emulator is solid, and it’s very simple to deploy to your actual device to see how it works there. What wasn’t as clear to me was how to test app updates when changing the data structure I’m saving to isolated storage.

After doing a lot of experimenting, I’ve ended up with this approach:

  1. Deploy your last version’s XAP file to your device or emulator using the ‘Application Deployment’ tool you’ll find in the ‘Windows Phone Developer Tools’ folder in your start menu
  2. Interact with the app in whatever way makes sense for the scenario you’re testing (e.g., get it to save data in the old format)
  3. Load up the new version of the app’s solution in Visual Studio
  4. Deploy the app from within Visual Studio (i.e., Ctrl+F5) and test away

This has worked for me so far (even though I ended up missing a bug recently) but I’m not certain it’ll work for all scenarios; still worth giving it a go methinks.

As always, it’s a good idea to use some sort of source control. I’ve also ended up keeping the XAP file for each version I’ve released and branched my code for each release to make it easy to go back and test the various scenarios.

Lastly, I can confirm that the current version of the ‘Application Deployment’ tool cannot be used solely to  test the update process by deploying the old version and then the new version. It seems to uninstall the old version completely before installing the new so your data automatically gets deleted before the new version gets installed. Deploying from Visual Studio seems to be able to deploy without discarding the old data though.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.