Continuous Delivery for Android Apps – Part 2


October 6, 2011

This post talks about how to run tests for the build setup as mentioned in Part 1.

Generate the build script for test

The suggested practice is to have 2 separate projects for android, one the source and the other for the tests. The following command will generate a build.xml for the test project. Replace the with the path of the source path.

android update test-project -m ../<project-path> -p .

One problem I’ve seen is that, it does not break the build even if there are failures in the test. Issue is reported here:

I had to override the run-tests target as mentioned below to fix this issue:


Running tests ...


You can change the ant commands to clean run-tests release in Jenkins to run the tests as part of packaging.

Next I will be writing about how to start emulator from Jenkins while running the tests.