HockeyApp, the new attraction of Microsoft cross platform development enthusiasts, is a beta testing platform tool for iOS, Android and Windows Phone. Using HockeyApp, applications can be distributed to QA teams or simply used as a beta testing hub. Its feature set is comparable to Apple’s TestFlight for iOS platform. (It is worth it to mention that HockeyApp started out as an independent software, developed by a Stuttgart based team until it was acquired by Microsoft).
However, HockeyApp not only provides an easy testing and analysis platform but also fills in an important gap in the Application Lifecycle Management (DevOps). In a general implementation scenario using VSTS for project management and/or source control, application projects developed in Visual Studio using Xamarin (for iOS and Android, and Windows Phone) are stored in the online repository. This repository can be Team Foundation Services or a Git repository can be associated with the TFS project. After the developer handoff, the code can be built using one of the build templates in Visual Studio.
This workflow can be extended to run unit tests for possible portable class libraries that requires testing. On top of the unit tests, Xamarin Test Cloud and calabash tests can be employed to run automated UI tests for platform specific applications.
Now the application is built, tests are run (even possibly integration tests), but where do we go from here. There is no automated service integration to MDM (Mobile Device Management), or possible way for beta tester to download packages from some drop location. Although, in all fairness, android application packages can be dropped to an FTP or other shared folder so they can downloaded by the beta users from this location. For windows phone applications, some custom company hub can be used to read the appx packages and serve them as available applications for download. However, none of these solutions provide a single framework to deploy the CI build artifacts to beta devices.
At this point HockeyApp comes into the story. With their release of VSTS service endpoint and the associated build step; TFS builds can now include a HockeyApp deployment.
In order to use the HockeyApp deployment, you first need to install HockeyApp for VSTS from the Visual Studio market place.
Once the installation is complete, the HockeyApp service endpoint should be configured in Visual Studio Team Services configuration page. However, since we will need the API token for HockeyApp, it would be useful first to create a Full Access API token in HockeyApp dashboard.
The API token will be used by the VSTS Service to access and deploy the application bundles. In order to set up the HockeyApp Service on VSTS, you will need to navigate to the Services section of the Control Panel for the specific team project. If you click on “New Service Endpoint”, you should now have the option of HockeyAp. In order to create this endpoint, you will need to define the API token and the service endpoint connection name.
Now that the HockeyApp connection is setup and configured, you can head back to your build definition and the HockeyApp build step right after the application package is prepared (and possibly signed). In the connection field, you will need to select the service endpoint we setup in the previous step. For the binary file path, you can use the previous Copy and Publish Build Artifacts tasks location (i.e. by default “drop” which would refer to $(Agent.BuildDirectory)\drop). You can use a more generic wildcard path similar to $(Agent.BuildDirectory)\**\*.apk for an Android Application.
You can additionally include release notes, symbol files, or add download restrictions for HockeyApp tags, teams and users. If you want to associate the application package with an existing application metadata saved on the HockeyApp dashboard, you would need to use the App ID. In my trials, I didn’t need to create the application on HockeyApp dashboard before triggering the build (i.e. Empty Application Id worked out).
And that’s about it… Now each build will automatically deploy the application to your HockeyApp Repo and the application can be downloaded onto the testing devices using the HockeyApp install link that is generated for your HockeyApp account.
Currently HockeyApp offers a free tier with 2 applications. Also if you are quick you might get a free HockeyApp puck if you integrate with Visual Studio Team Services (http://hockeyapp.net/blog/2015/11/24/score-a-free-puck.html). 🙂
Happy coding everyone…
And thank you HockeyApp team for this great product.