This is the third part of a series on testing WP8 Apps. The first post introduced you to the WP8 platform and the second post had you install the prerequisites. This post will focus on the XAP file and side loading it onto your device or emulator.
Side loading is the act of installing an application from your computer connected directly to your device. To do this in WP8 you must obtain the XAP file from the developer. Ensure this is in your contract as push back by developers to provide the XAP file is common. Note that the phone will only run apps signed with trusted certificates and your phone must be unlocked as explained in part one and two of this series respectively.
You may download a XAP file from the store if you want to follow along and do not have the developer provided XAP file. Search the Windows Phone store for the app you will be testing and select Download and install manually from the bottom left of the screen as shown in the screen shot below:
Alternatively, you can download a XAP file from XDA-Developers. Here is a link to the YouTube XAP.
What is a XAP file?
XAP is a file format used for both Windows Phone applications and Silverlight applications. XAP files are ZIP file formatted packages. The MIME type associated with XAP files is
application/x-silverlight-app. The XAP file generally contains a AppManifest.xaml file which defines the assemblies that get deployed in the client application as well as the DLLs required by the app. Below is an example:
XAP files downloaded from the app store come PlayReady DRM encrypted. Encrypted XAP files will not run in the emulator. This is one of the reasons I prefer to have a physical device.
To determine if the XAP file is encrypted or not, you can open it with notepad. If the first line of text is PK then the file is not encrypted. If the first line of text is PRE, then it is encrypted. Here is an example, the one on the left is not encrypted.
To side load the app, you can use Application Deployment shortcut that came installed with the Windows Phone SDK or a tool called Windows Phone Power Tools. We will use Windows Phone Power Tools to look at the local storage of the app in the following post. Install the tool from the website onto your Windows 8 system with the Windows Phone SDK.
Plug in your device, unlock it, and run the Windows Phone Power Tools application. You will be able to launch an emulator from the drop down or connect to the device.
Make sure your physical device is connected to the Windows 8 system via USB, unlock it, and click Connect. From the main screen, you can click browse and select the XAP file to side load:
Click Install and wait for the app to install.
You now have an understanding of how WP8 applications are packaged and distributed. To look at the local storage of the app you will need the developer provided XAP file and side load the app onto your device or emulator. Now that you have the app installed on the device or emulator we will begin testing!