Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous Integration for Android via TeamCity. Preferred tools?

Our team is new to both Android and Java development (originally, we came from C++), therefore our knowledge about build tools for java is pretty shallow.

There are few build tools which can be used for build automation, and the most interesting I found were ant and maven. And although there are many articles on build automation, I didn't find any comprehensive tutorial on automating Integration process for android apps.

I would be very greatful if you could state your preferable build tool for Android and explain or give any links explaining the process of continuous integration for android apps (which cover not only building application package, but running tests under the emulator).

Thank you very much for your time and assistance.

P.S.: We are using Team City as the Continuous Integration server.

like image 728
Alexey Kolganov Avatar asked Apr 22 '11 11:04

Alexey Kolganov


2 Answers

We are building our continuous integration platform for Android using the following:

Maven - for managing the build/unit-test/integration-test/deploy cycle Hudson - for continuous integration

Team City will also run Maven projects - it is fairly simple to configure a TeamCity agent to run a specific Maven goal e.g. mvn integration-test - the agent could be running on a PC with an Android emulator or a real Android device plugged in.

In the past I've had a whole bank of TeamCity agents testing against different hardware. For example if you have 5 Android devices plugged into an agent you can configure the TeamCity build pipeline to run the integration tests (controlled easily via Maven) on ALL 5 devices and only declare a PASS when they pass on all 5.

like image 104
Matt Green Avatar answered Sep 24 '22 05:09

Matt Green


Ant (http://ant.apache.org/) is pretty much the de facto standard for building java projects. It features a very easy to learn scripting language and can even be used to deploy your application to multiple targets.

For automated testing, most java developers use jUnit (http://www.junit.org/). While not quite as seamless as the Ruby on Rails testing framework, jUnit tests do allow for test-driven development.

Maven (http://maven.apache.org/what-is-maven.html) is more of a meta-program that can use ant scripts and run your jUnit tests. True, ant can also be used to run jUnit tests, but Maven does a good job of pulling all of that together as well as providing extra functionality (example: the ability to automatically find external dependencies and download them).

While I am not familiar with TeamCity, I would be surprised if it did not have a way to integrate with ant/maven/junit.

Best of luck!

like image 26
mdinstuhl Avatar answered Sep 24 '22 05:09

mdinstuhl