Droidcon Paris 2013 - Musclez vos applications Android avec les outils du monde java


Published on

Musclez vos applications Android avec les outils du monde java, conférence Droidcon Paris 2013

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Droidcon Paris 2013 - Musclez vos applications Android avec les outils du monde java

  1. 1. 1 Tél : +33 (0)1 58 56 10 00Fax : +33 (0)1 58 56 10 01www.octo.com© OCTO 201250, avenue des Champs-Elysées75008 Paris - FRANCEBeef up your Android apps, using Java toolsMusclez vos apps Androidavec les outils du monde Java.Jérôme Van Der Linden & Stéphane Nicolas
  2. 2. 2 ! Java / Android / JEE Architect!   Design, development, audit!   Industrialization of software engineering! OSS softwares on GitHub!   Android Holo Colors, Sonar Android Lint Plugin! Appaloosa Store co-founderJérôme Van Der Linden@jeromevdl +jerome van der linden
  3. 3. 3 ! 17 years of Java experience!   Mostly teaching, programming, designing.! OSS softwares on GitHub!   RoboSpice, Quality Analysis Tools for Android,RoboDemo, ORMLite Content Provider Compiler!   Contributor of android maven plugin! Quebecer-like, woodworker wanna be, OSS-fan,Android coderStéphane Nicolas+stephane nicolas
  4. 4. 4 Quality Tools Available on AndroidQuality ToolsFor AndroidCalabashMockitoRobotiumUIAutomatorRobolectricJUnitJenkinsSonarMavenAntGenyMotionEmulatorVogarEmma JacocoLintPMDCheckStylefindbugsEasyMockCoberturaDeviceFEST-AndroidSpoonTest Tools Reporting Tools Code coverage GraddleMonkeyMonkeyRunner
  5. 5. 5 https://github.com/stephanenicolas/Quality-Tools-for-Android (http://goo.gl/pdwnq)
  6. 6. 6 Initial setup#install Eclipse Juno or IntelliJ#install ADT (for Eclipse)#install a few Android SDK (i.e: 8,11, 14, 17)#install Hardware Acceleration fromIntel#install X86 android emulator withHardware Acceleration Support #install maven 3.0.3+#install Jenkins#install Jenkins AndroidEmulator PluginJenkinsMaven
  7. 7. 7 #install Sonar#install the Sonar Android Lint Plugin git clone git@github.com:SonarCommunity/sonar-android.git mvn clean install cp target/*.jar [SONAR_HOME]/extensions/plugins/ sonar.sh restart#install the Sonar Emma PluginSonar LintPMD CheckStylefindbugsEmma CoberturaInitial setup :: SonarJacocoThanks to Thomas Bores Florian Roncarifor their contributions to the sonar lint plugin.
  8. 8. 8 # clone the repository on GitHub git clone git@github.com:stephanenicolas/Quality-Tools-for-Android.gitThis 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 andJenkins.
  9. 9. 9 Project Structure•  Main app + Robolectric : Maven Android project •  Shared configuration : Maven parent project •  Android Junit Tests : Maven Android project •  UI Automator Tests : Maven Java project Eclipse projects follow maven submodules.
  10. 10. 10 Maven profilesJunit + Robotium Robolectric UIAutomator Code coverageQuality checks(Checkstyle +findbugs +PMD + lint)Sonarstandardemmacoberturauiautomatorspoonjacoco
  11. 11. 11 Standard profile :Running tests and Quality checksRobo lectric Robotium JUnit UIAutomator Lint PMD CheckStylefindbugs# run all tests mvn clean install
  12. 12. 12 Emma profile :JUnit tests and Emma code coverage in SonarRobo tium JUnit Emma SonarLint PMD CheckStylefindbugs# run standard junit tests and get code coverage mvn clean install –P emma # Report in Sonar mvn sonar:sonar –P emma
  13. 13. 13 Cobertura profile :Robolectric tests and Cobertura code coverage in Sonar# run robolectric tests and get code coverage mvn clean cobertura:cobertura –P cobertura # Report in Sonar mvn sonar:sonar –P cobertura Robo lectric CoberturaSonarLint PMD CheckStylefindbugs
  14. 14. 14 Jacoco profile :Robolectric and standard tests and Jacoco code coverage in Sonar# run robolectric tests and get code coverage mvn clean install –P jacoco # Report in Sonar mvn sonar:sonar –P jacoco Robo lectric JacocoSonarLint PMD CheckStylefindbugsRobo tium JUnit
  15. 15. 15 UI Automator profile :Running UI Automator tests# run UI Automator tests mvn clean install –P uiautomator mvn sonar:sonar –P uiautomator UIAutomator SonarLint PMDCheckStylefindbugs
  16. 16. 16 Spoon profile :Running Junit Robotium via Spoon# run JUnit Robotium tests via spoon mvn clean install –P spoon Robotium JUnit Lint PMD CheckStylefindbugs Spoon
  17. 17. 17 Monkey profile :Running Monkey tests# run Monkey tests and get result in Sonar mvn clean install –P monkey Monkey Lint PMD CheckStylefindbugs Sonar
  18. 18. 18 Monkey Runner profile :Running Monkey runner tests# run Monkey runner tests #and get result in Sonar mvn clean install –P monkeyrunner Monkey Runner Lint PMD CheckStylefindbugs Sonar
  19. 19. 19 ! Let’s take advantage of Java maturity.! Testing and building more robust apps can be easy.! Choose technologies that suit your needs.! Clone our project on GitHub, try it, contribute !Conclusionhttp://goo.gl/pdwnq
  20. 20. 20 https://github.com/stephanenicolas/Quality-Tools-for-Android(http://goo.gl/pdwnq)Live Demo
  21. 21. 21 Question and comments ?