7. Initial Setup
#install Eclipse Juno or IntelliJ
#install maven 3.0.3+ Maven Jenkins
#install ADT (for Eclipse)
#install Jenkins
#install a few Android SDK (i.e: 8, 11, 14, 17)
#install Jenkins Android Emulator Plugin
#install Hardware Acceleration from Intel
#install X86 android emulator with Hardware
Acceleration Support
#install Sonar Cobertura findbugs PMD Check
Sonar
Style
#install the Sonar Android Lint Plugin
> git clone git@github.com:jeromevdl/sonar-android-lint-plugin.git Lint
> mvn clean install && cp target/*.jar [SONAR_HOME]/extensions/plugins/
> sonar.sh restart
Emma
#install the Sonar Emma Plugin
8. Getting started
# clone the repository on GitHub
> git clone git@github.com:stephanenicolas/Quality-Tools-for-Android.git
This projects combines many Quality Tools for Android.
It demonstrates how to set up those tools.
It is not intended to be used as a maven archetype.
No project will need all of those technologies,
take only what you need.
All configurations work both in IntelliJ, Eclipse, Maven CLI and
Jenkins.
11. Standard profile :
Running tests and Quality checks
Robotium JUnit Robolectric UI
Automator
Lint findbugs PMD Check
Style
# run all tests
> mvn clean install
12. emma profile :
JUnit tests and Emma code coverage in Sonar
Robotium JUnit Emma Sonar
Lint findbugs PMD Check
Style
# run standard junit tests and get code coverage
> mvn clean install –P emma
# Report in Sonar
> mvn sonar:sonar –P emma
13. cobertura profile :
Robolectric tests and Cobertura code coverage in Sonar
Robolectric Cobertura Sonar
Lint findbugs PMD Check
Style
# run robolectric tests and get code coverage
> mvn clean cobertura:cobertura –P cobertura
# Report in Sonar
> mvn sonar:sonar –P cobertura
14. jacoco profile :
Robolectric and standard tests and Jacoco code coverage in Sonar
Robotium JUnit Robolectric Jacoco Sonar
Lint findbugs PMD Check
Style
# run robolectric tests and get code coverage
> mvn clean install –P jacoco
# Report in Sonar
> mvn sonar:sonar –P jacoco
17. Conclusion
Let’s take advantage of Java maturity.
Testing and building more robust apps can be
easy.
Choose technologies that suit your needs.
qrcode.12511021.png
Clone our project on GitHub, try it, contribute !
http://goo.gl/pdwnq