Testing an application update

By ltomuta

September 16, 2013   Comments

windows-phone, tools, testing

A colleague asked me today why on side-loading an example application for testing all the data previously saved in application’s isolated storage was lost. Is that normal? And if so, how can one still test use cases such as application updates, when it is important that data saved by the old version of the app remains accessible to the new application instance?

Well, it is normal. If you are using the Application Deployment tool (XapDeploy.exe), that is wink.

But when Visual Studio deploys the latest build it does so by updating the existing copy. So how does it do it? It uses the command line variant of the Application Deployment tool, XapDeployCmd.exe. This utility, delivered with the SDK, allows you to install, update, uninstall and launch an application on the connected device, using parameters such as the XAP file or application’s Product ID, respectively. When the update option is used the new XAP file is installed overwriting the old versions of the files it contains but without resetting application’s isolated storage.

For example, in order to update the Photo Inspector application: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XAP Deployment> XapDeployCmd.exe /update D:\PhotoInspector_NewBuild.xap /targetdevice:de

Run the application with “/?” as parameter to see its pretty verbose help content or read all about it on MSDN.

Using this tool the work of testing engineers and reviewers is made a lot easier. Of course, as discussed earlier, it is possible to combine this technique with isolated storage snapshots saved, augmented and uploaded as to construct specific test cases in which the saved data can be changed and restored as needed.