When it comes to testing mobile and web applications, web applications have one distinct advantage – the developer deploys the latest changes. Beta testers just fire up their preferred browsers and get to testing. Testing mobile applications, however, can be a bit more painful when developers, QA testers, and business stakeholders run the applications on their own devices. Rather than playing the ultimate game of “but it runs on my device,” try building a continuous delivery pipeline so features are ready for review as fast as you can develop them.
This article walks through building a continuous delivery pipeline for a Xamarin app with Visual Studio Team Services (VSTS) for iOS and Android using TestFlight and HockeyApp respectively.
iOS
Apple’s own TestFlight app makes it easy for testers to download the latest beta version of an iOS app and test it. They can update to the latest version of the beta app. Typically, the application developer has to make each new version available to the testers manually. When set up through VSTS, however, making the latest release available to testers is as easy as checking in code.
Adding the “TestFlight” task to the VSTS build or release pipeline after the build/compile step makes this possible.
- Install “Apple App Store” from the VSTS Marketplace to the VSTS installation. This should add the “Apple App Store Release” option to the available options when adding a task.
- Add the “Apple App Store Release” task to the build or release pipeline.
- Add required fields – authentication information for TestFlight account, bundle information, and .ipa path.
- Switch the “Track” to “TestFlight” under “Release Options.”
- Profit.
To make continuous deployment possible, it is recommended to include an “Increment Build Number” step. The Apple Store and TestFlight won’t accept a subsequent upload of an application with the same bundle number, and it can be hard to remember to increment the bundle number before each check-in.
Android
HockeyApp provides one-click download of Android apps to all authorized test users. Its web-based interface allows the developer to provide release notes and testers to provide feedback. HockeyApp requires a bit more technical savvy than TestFlight from the person installing the app, but it makes the process much simpler than distributing .apk files to users manually. Similar to TestFlight, application developers are responsible for uploading the newest test versions to the server, but with VSTS, the latest versions can be made available with each code change.
Add the “HockeyApp” task to the VSTS build or release pipeline to make use of the magic.
- Install “HockeyApp” from the VSTS Marketplace to the VSTS installation, which will add the “HockeyApp” task as an option.
- Make sure there is an “Application” set up in HockeyApp to receive VSTS-built application loveliness.
- Armed with the Application Id from the application in HockeyApp, the “HockeyApp” task can be added to the pipeline.
- If a connection to HockeyApp is not already set up, there will be a prompt to add a new one. To do so, the HockeyApp account connection id is needed.
- It will also ask for the application id for the application mentioned during step 2, as well as the path to the .apk file from the build.
- Profit.
Ready to accelerate your Xamarin development? Don’t let delivering your mobile applications for testing be a blocker – let your continuous delivery pipeline do the work. to learn more.