How to test Windows Phone app upgrades

Properly testing app upgrades on Windows Phone is not as straightforward as it could be. When you deploy a XAP from the IDE or with the XapDeploy tool the build system will evaluate whether an incremental update is possible or if a full redeploy is required.  A full redeploy will remove all of the app’s IsolatedStorage and make testing upgrades impossible unless we use the ISETool.

Deploy the current version of the app

For this step you can install the current version of the app any way you want.

Populated your isolated storage

Use the app to populate its isolated storage.  As a developer you should know what is cached by your application so use it in such a way that the isolated storage is fully populated.

Backup your isolated storage

ISETool.exe is located in your SDK and you will find it in a path similar to this:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\IsolatedStorageExplorerTool\ISETool.exe

For the sake of brevity I will omit the full path in the rest of the post.  To backup your isolated storage use the following command:

ISETool.exe ts <device> <product id>"C:\path\to\backup\folder"
  • Replace <device> with “xd” if you are backing up an emulator or “de” if you are backing up a device.
  • Replace <product id> with the ProductID of your app as defined in WMAppManifest.xml

After the command completes verify that the data has been backed up to the path you specified.

Install the new version

When installing the new version it is important to use the XapDeploy tool because it will install the new version without starting it, giving us a chance to restore the settings first.  This tool is a graphical one so just select the new xap and the device or emulator to install it to.

Restore your isolated storage

ISETool.exe rs <device> <product id> "C:\path\to\backup\IsolatedStore"

Use the ISETool once again to restore the settings to the device or emulator replacing <device> and <product id> as you did in the backup step.  Note that you must append “IsolatedStore” to the path you specified in the backup step.

Start the new version of the app

Now you can start the new version of the app and test that everything works as expected.  These steps can also be integrated into the build system to automate the process but that is an exercise for the reader!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s