Companies use IBM UrbanCode Deploy to achieve automated deployment at scale for web, distributed and now mobile apps alike. While this kind of DevOps practice may be starting in your company, if you’re the mobile team, you may not realize how it can help you too.
As I visit with IBM clients, I’m thrilled to see the practice of continuous integration (CI) used consistently by teams to automate building mobile apps. In the beginning, the CI solution often involves Git and Jenkins, and why not? With Jenkins supporting over 600 plug-ins and a very active community, it’s the #1 open source CI server.
However, I’ve noticed some recurring patterns in how these teams evolve:
It doesn’t take long after they really want an integrated way to track who's doing what, and when it will get done. I’m not going to elaborate on this today, so let me just suggest you checkout IBM JazzHub (and you don’t have to give up Git or GitHub to get started).
The CI Server gets overloaded with deployment tasks, and the deployment and testing part of the pipeline gets inefficient, fast.
I’m going to focus on issue #2, and stick to just the Android OS target for now.
You’ll find the Android Emulator Plugin for Jenkins offers a lot of very useful features. As part of a CI process, it’s great for doing some basic shake down testing using an emulator or device. In this blog entry, Hans Capelle does a nice job describing workarounds for some common issues you’re likely to encounter.
But don't make the mistake of overloading this useful plug-in. Despite a matrix job feature, it really only allows you to launch one emulator per job. To launch automation tests for different phases, different types of tests, different form factors, and different Android OS versions, it means you have to create tens of Jenkins jobs and manage them. Furthermore, if you’re targeting multiple platforms, not just Android, there’s no way to specify if the build should actually be deployed and tested on Android.
Enter the new Android SDK plug-in for IBM UrbanCode Deploy (UCD). Rather than trying to force Jenkins to handle the deployment of your Android app to emulators or devices, you can use the automated deployment engine of UCD to handle it.
And you don’t have to give up Jenkins because UCD has a plug-in for that too! Simply use Jenkins to do the CI work it’s best at, and then pass the APK (and Android SDK-based tests) to UCD to handle the automated deployment of your app to one or more distinct environments for testing. So your environment, for example, could be:
The new Android SDK plug-in makes it possible to define deployment processes that deploy and even test your app. With the Android SDK plug-in, you can interact with the app by:
Install app / Remove app
Run an ADB command (an SDK tool)
Run an Android command (an SDK tool)
UI Automated Testing (Android SDK)
Unit (or Activity) testing (Android SDK)
Random UI (or monkey) Testing (Android SDK)
And the plug-in doesn’t stop at application interaction; you can also manage your emulators through:
Create / Remove
Start / Stop
You can download the new plug-in here, and don’t hesitate to provide feedback; it’s critical and highly appreciated. Best of luck with your Android apps!