Ranger4 DevOps Blog

The NEW Android Plugin for IBM UrbanCode

Posted by Tejinder Sehgal on Mon, May 12, 2014 @ 10:05 am

IBM just announced a new Android plugin for its deployment automation tool, UrbanCode. It can be used to help solve a very common problem for mobile developers; memory leaks. Memory leaks can be frustrating as they may not occur until hours or even days of normal use. A proven technique to shake out these bugs quickly is monkey testing.

andriod plug in 1 resized 600

A monkey test runs on your emulator or device and generates pseudo random user events to help find crashes and application non-responsiveness. Using the Android plugin for UrbanCode makes it possible to install an application on the target where other types of tests provided can be run such as user created Unit and UI tests.

The new Android plugin can help you find memory leaks by applying continuous deployment and monkey testing to your application. To begin we manually start the process:

andriod plug in 2 resized 600

However, the process could be automated to run automatically after an integration build against either new or existing emulators/physical devices. The process is run against a development environment which is local in this scenario, although it could be remote. Here we use the latest version of the application output from the build.

andriod plug in 3 resized 600

Upon submission the application artefacts (which could include tests) can be copied to the machine running the request process execution:

andriod plug in 4 resized 600

The detailed deployment steps can be seen on the left hand side of the screen below:

andriod plug in 5 resized 600

 Next the process starts two emulators which appear on the right hand side of the screen:

andriod plug in 6 resized 600 

The emulators have been optimised to start quickly through hardware acceleration and the use of snapshots allow for saving the state of an emulator similar to starting your computer  from sleep mode. Once the emulators have been detected we see the monkey test run in parallel:


andriod plug in 7 resized 600

When the tests (configured to send a specified number of events) are completed, the results are made available to the development team and the web console and the emulators are shut down:

andriod plug in 8 resized 600

The Android plugin helps fill an important role for the mobile application development team by providing a scalable application testing tool that can provide an automated approach for installing and testing an application in order to achieve higher quality applications.

Topics: UrbanCode