Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Musclez vos apps Android avec les outils du mon...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Musclez vos apps Android avec les outils du monde java

Conférence Droidcon Paris 2013

Jérôme Van Der Linden

June 18, 2013

Transcript

21 slides
  1. 1 Tél : +33 (0)1 58 56 10 00 Fax

    : +33 (0)1 58 56 10 01 www.octo.com © OCTO 2012 50, avenue des Champs-Elysées 75008 Paris - FRANCE Beef up your Android apps, using Java tools Musclez vos apps Android avec les outils du monde Java. Jérôme Van Der Linden & Stéphane Nicolas
  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-founder Jérôme Van Der Linden @jeromevdl +jerome van der linden
  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 coder Stéphane Nicolas +stephane nicolas
  4. 4

  5. 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 from Intel #install X86 android emulator with Hardware Acceleration Support #install maven 3.0.3+ #install Jenkins #install Jenkins Android Emulator Plugin Jenkins Maven
  6. 7 #install Sonar #install the Sonar Android Lint Plugin >

    git clone [email protected]:SonarCommunity/sonar-android.git > mvn clean install && cp target/*.jar [SONAR_HOME]/extensions/plugins/ > sonar.sh restart #install the Sonar Emma Plugin Sonar Lint PMD Check Style findbugs Emma Cobertura Initial setup :: Sonar Jacoco Thanks to Thomas Bores & Florian Roncari for their contributions to the sonar lint plugin.
  7. 8 # clone the repository on GitHub > git clone

    [email protected]:stephanenicolas/Quality-Tools-for-Android.git This projects combines many Quality Tools for Android.
  8. 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.
  9. 10 Maven profiles Junit + Robotium Robolectric UIAutomator Code coverage

    Quality checks (Checkstyle + findbugs + PMD + lint) Sonar standard emma cobertura ui automator spoon jacoco
  10. 12 Emma profile : JUnit tests and Emma code coverage

    in Sonar Robo tium JUnit Emma Sonar Lint PMD Check Style findbugs # run standard junit tests and get code coverage > mvn clean install –P emma # Report in Sonar > mvn sonar:sonar –P emma
  11. 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 Cober tura Sonar Lint PMD Check Style findbugs
  12. 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 Jacoco Sonar Lint PMD Check Style findbugs Robo tium JUnit
  13. 15 UI Automator profile : Running UI Automator tests #

    run UI Automator tests > mvn clean install –P uiautomator > mvn sonar:sonar –P uiautomator UI
  14. 16 Spoon profile : Running Junit & Robotium via Spoon

    # run JUnit & Robotium tests via spoon > mvn clean install –P spoon Robotium JUnit Lint PMD Check Style findbugs Spoon
  15. 17 Monkey profile : Running Monkey tests # run Monkey

    tests and get result in Sonar > mvn clean install –P monkey Monkey Lint PMD Check Style findbugs Sonar
  16. 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 ! Conclusion http://goo.gl/pdwnq

More Decks by Jérôme Van Der Linden

Other Decks in Programming