I am an Android developer but I am not satisfied with my testing and Continuous Integration environment and configuration.
Someone could recommend me how to configure the best setup and workflow for a good CI in Android?
That includes:
- Automation build tool: Maven, Ant, Graddle...
- Testing tools and libraries
- Testing configuration: Where to put unit tests, integration tests...
- Test coverage
- Continuous Integration server
- Other QA tools and their configuration: FindBugs, PMD...
- General workflow
Any recommendation, suggestion or example of Android application using CI is really appreciated!
EDIT:
Because people asked for it, here I will explain how is my current environment and which things don't totally convince me. In any case, if you think that something totally different from that is better, don't hesitate to say so.
Automation build tool: I use both Maven and Ant. My first idea was using only Maven (I like how clean and structured it makes your projects), but seeing that Ant is the automation build tool used by the Android team and that I could not achieve some things with Maven, I also added Ant.
More on that later.
Archetypes: I used the Maven Android Archetype android-release-archetype to create my project, and modify the result to include the Android Library Project I am developing. So, I have a Maven parent project with three submodules: Android Library Project, Android standard application and Android Test Project (instrumenting the Android application).
Testing tools and libraries: Standard JUnit, Android Instrumentation, Robolectric and Robotium.
Testing configuration: I have the tests made with Instrumentation and Robotium in my Android Test Project and the JUnit and Robolectric tests in the same project I am testing the code. The reason for that is that I could not get Robolectric to test code in another project, but I would prefer to have all tests in the Android Test Project (I don't know if that is a good idea, but it seems to me). Also, I still don't know (I haven't had the time to look for it) how to tell Maven or Ant to execute a subset of the tests.
Test coverage: I have not been able to generate a test coverage report with Maven and that is the reason I finally also added Ant (you can get test coverage with Ant following the next instructions: Building an Android app and test project).
Continuous Integration server: Jenkins and the Android Emulator Plugin (although I think it has some issues with last versions of the SDK).
Other QA tools and their configuration: I have not looked at it yet.
General workflow: Jenkins polls for changes in the project every 5 minutes and builds everything if it finds any. Also, I have nightly builds no matter what. Regarding my development workflow, I just run all the tests from time to time during the day and always before committing. I don't find that ideal because the tests in the device (Instrumenation and Robotium) take a long time, so I would prefer instead to run only the deviceless tests while developing, and all of them before committing.
All suggestions and improvements are welcomed!