Continuous Integration (CI) and Continuous Delivery (CD) play a large role in Pivotal’s agile engineering culture. Integration testing can be simulated in many different ways, but when it comes to Mobile Services, the only viable solution is to use real devices. We have implemented a method that offers an automated 360 view of our product quality throughout the development process, from the installation of a tile in Pivotal Cloud Foundry Ops Manager to delivery of end-user mobile applications that use products such as the Push Notification Service.
With thousands of devices on-hand, we have the ability to do robust testing across many different systems, both in the cloud and on mobile operating systems. Below is an example of how we test our Push Notification Service product.
For iOS, we use libimobiledevice’s ideviceinstaller to help us install and remove our applications. Then we use Instruments to help us coordinate and verify interactions once the applications are launched. Using Instruments means you can take advantage of runtime parameters each time you run your application. For our team, this means we can easily switch between several test environments using the same array of devices.
For Android, we use calabash-android, an automated testing technology, to install, remove, and perform interactions. Since runtime parameters aren’t supported, we have calabash-android go into our applications and configure them for the environment we’re currently testing.
Both tools work great out of the box, have a wide range of support in terms of OS versions, and don’t require you to alter your applications.
Due to the nature of push notifications, we also have to register our test applications with the service providers for the respective platforms—Apple Push Notification Service for iOS and Google Cloud Messaging for Android.
Now that we have all of our tools and test applications in place, we can go ahead and test our solution, taking the following steps:
- Create applications and platforms (variants) via the Push Notification Service
- Deploy native test applications
- Register native applications with the Push Notification Service
- Send a test push notification via the Push Notification Service
First we deploy and set up our Push Notifications Service in a freshly spun up Pivotal Cloud Foundry environment dedicated to CI. Setup involves using the Push Notifications Service API for registering a test application and platform with the service. The API will return the keys needed for the native test applications to register with the service.
Once the applications are deployed and configured with the right keys and parameters we received from the API, they begin an array of integration tests with the Push Notification Service. You can see a small example of this in action here.
This is continuous delivery for mobile at a level never seen before. Each line of change in a backend microservice can trigger a chain of regression that may dramatically impact a client application downstream. Our fully integrated setup with GoCD, Pivotal Cloud Foundry, Calabash, and ideviceinstaller gives us the confidence to deliver our multifaceted products at agile speeds.
Our pipeline can detect and trace integration issues throughout the delivery chain, from the product packaging steps, to multi-cloud system integration, all the way to the running sample applications on physical devices. Using these testing bundles and Pivotal Cloud Foundry enables this sort of thorough process of Continuous Integration and Continuous Delivery within agile software development projects.
- Monsanto Sees 50% App Dev Lifecycle Improvement with Cloud Foundry
- An Introduction to the Pivotal CF Mobile Suite API Gateway
- 3 Killer Ways To Up Your Mobile Game in 2015
- Pivotal’s Top 6 Predictions for the Developer in 2015
About the Author
BiographyMore Content by Dwayne Forde