SlideShare a Scribd company logo
BEEF UP ANDROID APPS
USING JAVA TOOLS

Stéphane Nicolas &
Jérôme Van Der Linden
2	
  

Jerome Van Der Linden

android-­‐holo-­‐colors.com	
  

jeromevdl	
  

@jeromevdl	
  

+jerome	
  van	
  der	
  linden	
  
3	
  

Stéphane Nicolas
ox	
  
BoundB

And	
  others	
  :	
  RoboDemo,	
  Quality	
  Analysis	
  Tools	
  for	
  Android,	
  android-­‐maven-­‐plugin,	
  …	
  

stephanenicolas	
  

snicolas	
  

+stephane	
  nicolas	
  
4	
  
5	
  

1

ONCE UPON A TIME
JAVA ENVIRONMENT
6	
  

4	
  
7	
  

Everything is testable
Everything is measurable
Everything is integrated
No excuses to have poor apps !
8	
  

Great !
9	
  

And me ?!
10	
  

2

WTF ?!
ANDROID IS JAVA !
11	
  

Almost YES…
… a story of
Virtual Machine

So what … ?
12	
  

3	
  
Oh Yeah !
14	
  

(almost)

(almost)

Everything is testable

Everything is measurable
BUT

Everything is NOT integrated
15	
  

Quality Tools for Android

http://goo.gl/zGFvda
16	
  

3

Quality Tools Android
Ant
DroidconUK 2013 : Beef up android apps with java tools
18	
  

4

Quality Tools Android
Maven
19	
  

The magical

plugin

<plugin>!
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
"!
<artifactId>android-maven-plugin</artifactId>!
<version>3.6.1</version>!
</plugin>!
20	
  

The ultimate

profile

# run junit, robotium, robolectric tests and get code coverage!
> mvn clean install –P jacoco!
21	
  

Maven
Profiles

Junit	
  +	
  
Robo,um

Robolectric

UIAutomator

Code	
  
coverage

standard

emma
cobertura

ui	
  
automator

spoon

jacoco

x2	
  

Quality	
  
checks	
  
(Checkstyle	
  +	
  
findbugs	
  +	
  
PMD	
  +	
  lint)

Sonar
22	
  

Android Lint
Sonar plugin
# analyse code (pmd, checkstyle, findbugs, lint) and report in sonar!
> mvn sonar:sonar –P jacoco!

hOps://github.com/SonarCommunity/sonar-­‐android	
  
23	
  

Not an archetype

(see akquinet : http://goo.gl/O46LIw)

Only samples
Do not use everything !
Pick up what you need !
24	
  

Return of
real life experience
Maven	
  
Jenkins	
  
Sonar	
  (PMD,	
  checkstyle,	
  findbugs,	
  lint)	
  
Junit	
  (Instrumenta[onTestCase)	
  

~	
  100	
  screens	
  (phone	
  +	
  tablet)	
  
~	
  5	
  developers	
  during	
  only	
  5	
  months	
  
~	
  60k	
  loc	
  (java),	
  15k	
  loc	
  (xml)	
  
~	
  400	
  unit	
  tests	
  :	
  not	
  an	
  excep[onal	
  coverage	
  (~	
  30%)	
  
Built	
  on	
  each	
  commit	
  on	
  Jenkins	
  +	
  Genymo[on	
  
0	
  lint,	
  pmd,	
  findbugs,	
  checkstyle	
  viola[ons	
  
1	
  sonar	
  report	
  generated	
  each	
  night	
  with	
  those	
  metrics	
  
	
  
è	
  An	
  happy	
  customer	
  J	
  
25	
  

Lessons

learned

A	
  laborious	
  development	
  environment	
  :	
  
eclipse	
  +	
  maven	
  +	
  m2eclipse	
  +	
  android	
  m2e	
  connector	
  
è Many	
  hours	
  lost	
  è	
  Use	
  IntelliJ	
  !	
  	
  
A	
  laborious	
  execu[on	
  environment	
  :	
  emulator	
  
è	
  Too	
  slow	
  è	
  Use	
  Genymo[on	
  (or	
  at	
  least	
  a	
  device)	
  !	
  
	
  
Not	
  enough	
  tests	
  :	
  
è Instrumenta[onTestCase	
  are	
  too	
  heavy/slow	
  for	
  Unit	
  Tes[ng	
  	
  
è Use	
  Robolectric	
  and/or	
  think	
  about	
  MV*	
  paOern	
  
è	
  Keep	
  Instrumenta[onTestCase	
  for	
  Android	
  specific	
  (Ac[vity,	
  
Services,	
  …)	
  
	
  
26	
  

Lessons

learned

A	
  robust	
  development	
  environment	
  :	
  
eclipse	
  +	
  maven	
  +	
  m2eclipse	
  +	
  android	
  m2e	
  connector	
  
è	
  s[ll	
  some	
  problem	
  with	
  eclipse	
  and	
  maven	
  integra[on	
  
	
  
About	
  tests	
  
è Instrumenta[onTestCase	
  are	
  fast	
  enough	
  with	
  GenyMo[on	
  
è	
  Robolectric	
  can’t	
  give	
  you	
  enough	
  confidence	
  	
  
	
  
27	
  

5

Quality Tools Android
Gradle
28	
  

Before	
  	
  
V	
  0.6	
  

Lint
UIAutomator

Monkey & Monkey Runner
Robolectric
PMD, checkstyle, findbugs
Emma, Cobertura, Jacoco
Joke ?!
30	
  

V	
  0.6.+	
  

Lint
UIAutomator

Monkey & Monkey Runner
Robolectric
PMD, checkstyle, findbugs
Emma, Cobertura, Jacoco
31	
  

Quality
#
#
>
#
>

the gradle way

run junit, robotium, robolectric tests !
AND Chekstyle + PMD + Findbugs + Classycle!
gradle check!
report in sonar!
gradle sonarRunner!
32	
  

6

Conclusion

Android is filling the gap
Gradle
Feature
Application Variants &
Manifest merging

Standard	
  tests	
  &	
  Robo,um

Code	
  Coverage	
  
Robolectric
UI	
  automator	
  /	
  Monkey	
  /	
  
Monkey	
  Runner
PMD	
  /	
  CheckStyle	
  /	
  
FindBgugs	
  /	
  Classycle	
  /	
  Lint
Sonar	
  &	
  Project	
  Sites

0.6.1

VS Maven
Gradle

Maven

?

33	
  

3.6.1
Android offers

34	
  

lots of quality tools
lots of testing methods
rapid testing
Everything gets easier
to use
Build rock solid apps
35	
  

Thank You !
Any Question ?
stephanenicolas	
  
jeromevdl	
  

snicolas	
  
@jeromevdl	
  

Stéphane Nicolas &
Jérôme Van Der Linden

+stephane	
  nicolas	
  
+jerome	
  van	
  der	
  linden	
  
36	
  

Quality Tools for Android

http://goo.gl/zGFvda

More Related Content

PDF
Work with Developers for Fun and Progress - AppSec California
PPTX
Learn why use selenium with 3 million dollar bugs!
PDF
Move test planning before implementation
PDF
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
ODP
I Smell A RAT- Rapid Application Testing
ODP
Building an Open Source AppSec Pipeline
PPTX
DevOps - Understanding Core Concepts (Old)
PPTX
Improving developer tester collaboration with microsoft visual studio 2010
Work with Developers for Fun and Progress - AppSec California
Learn why use selenium with 3 million dollar bugs!
Move test planning before implementation
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
I Smell A RAT- Rapid Application Testing
Building an Open Source AppSec Pipeline
DevOps - Understanding Core Concepts (Old)
Improving developer tester collaboration with microsoft visual studio 2010

What's hot (15)

PPT
Inconvenient Truth(s) - On Application Security (from 2007)
PPTX
I dream of ISPWeb
PPTX
Application compatibility final
PDF
How we've built Yahoo Fantasy Football (Droidcon Italy '15)
PDF
Shift left-testing
PDF
Apptest.ai intro & pitch
PDF
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
PDF
Test Driven Development for Embedded C
PPTX
Developing Android Apps
PDF
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
PPTX
Pain Driven Development by Alexandr Sugak
PDF
How to Scale Mobile Testing Across Several Teams
PPTX
Creating testing tools to support development
PDF
Solid c-accu2014.key
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Inconvenient Truth(s) - On Application Security (from 2007)
I dream of ISPWeb
Application compatibility final
How we've built Yahoo Fantasy Football (Droidcon Italy '15)
Shift left-testing
Apptest.ai intro & pitch
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
Test Driven Development for Embedded C
Developing Android Apps
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
Pain Driven Development by Alexandr Sugak
How to Scale Mobile Testing Across Several Teams
Creating testing tools to support development
Solid c-accu2014.key
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Ad

Similar to DroidconUK 2013 : Beef up android apps with java tools (20)

PDF
Droidcon Paris 2013 - Musclez vos applications Android avec les outils du mon...
PPTX
Android developer's toolbox
PPTX
Devoxx jva-sni-en-overview
PDF
Groovy on Android
PDF
Mastering Android Development Tools
PDF
Scala on-android
PPTX
Android development tutorial
PPTX
Android Apps Testing in 2019
PDF
Groovy android
PPTX
Devoxx France 2013 : Musclez vos apps android avec les outils du monde java
PDF
Tools/Processes for serious android app development
PDF
Tools and libraries for common problems (Early Draft)
PDF
Innovation Generation - The Mobile Meetup: Android Best Practices
PPTX
Ii 1300-java essentials for android
PPTX
Android testing
PPT
PPTX
Latest Android App Development Tools 2019
ODP
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
PDF
Best Tools for Android App Development Software For Engaging Top-Notch Apps.pdf
PDF
The Ultimate List of Tools for Developing High-Quality Android Apps
Droidcon Paris 2013 - Musclez vos applications Android avec les outils du mon...
Android developer's toolbox
Devoxx jva-sni-en-overview
Groovy on Android
Mastering Android Development Tools
Scala on-android
Android development tutorial
Android Apps Testing in 2019
Groovy android
Devoxx France 2013 : Musclez vos apps android avec les outils du monde java
Tools/Processes for serious android app development
Tools and libraries for common problems (Early Draft)
Innovation Generation - The Mobile Meetup: Android Best Practices
Ii 1300-java essentials for android
Android testing
Latest Android App Development Tools 2019
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Best Tools for Android App Development Software For Engaging Top-Notch Apps.pdf
The Ultimate List of Tools for Developing High-Quality Android Apps
Ad

More from jeromevdl (11)

PDF
Message-Driven Architecture on AWS
PDF
Do more with less code in serverless
PDF
Do more with less code in a serverless world
PDF
DevopsDays Geneva 2020 - Compliance & Governance as Code
PDF
Softshake 2017 - Développer un chatbot Alexa
PDF
Chatbots buzzword ou nouvel eldorado
PDF
Management projet vs management produit
PDF
Softshake - Offline applications
PDF
My Android is not an iPhone like any others (Mdevcon 2014)
PDF
Jug Lausanne Android Janvier2013
ODP
Metroide
Message-Driven Architecture on AWS
Do more with less code in serverless
Do more with less code in a serverless world
DevopsDays Geneva 2020 - Compliance & Governance as Code
Softshake 2017 - Développer un chatbot Alexa
Chatbots buzzword ou nouvel eldorado
Management projet vs management produit
Softshake - Offline applications
My Android is not an iPhone like any others (Mdevcon 2014)
Jug Lausanne Android Janvier2013
Metroide

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
A Presentation on Artificial Intelligence
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25-Week II
A Presentation on Artificial Intelligence
Spectral efficient network and resource selection model in 5G networks
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative analysis of optical character recognition models for extracting...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
Assigned Numbers - 2025 - Bluetooth® Document
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

DroidconUK 2013 : Beef up android apps with java tools

  • 1. BEEF UP ANDROID APPS USING JAVA TOOLS Stéphane Nicolas & Jérôme Van Der Linden
  • 2. 2   Jerome Van Der Linden android-­‐holo-­‐colors.com   jeromevdl   @jeromevdl   +jerome  van  der  linden  
  • 3. 3   Stéphane Nicolas ox   BoundB And  others  :  RoboDemo,  Quality  Analysis  Tools  for  Android,  android-­‐maven-­‐plugin,  …   stephanenicolas   snicolas   +stephane  nicolas  
  • 5. 5   1 ONCE UPON A TIME JAVA ENVIRONMENT
  • 7. 7   Everything is testable Everything is measurable Everything is integrated No excuses to have poor apps !
  • 11. 11   Almost YES… … a story of Virtual Machine So what … ?
  • 14. 14   (almost) (almost) Everything is testable Everything is measurable BUT Everything is NOT integrated
  • 15. 15   Quality Tools for Android http://goo.gl/zGFvda
  • 16. 16   3 Quality Tools Android Ant
  • 18. 18   4 Quality Tools Android Maven
  • 20. 20   The ultimate profile # run junit, robotium, robolectric tests and get code coverage! > mvn clean install –P jacoco!
  • 21. 21   Maven Profiles Junit  +   Robo,um Robolectric UIAutomator Code   coverage standard emma cobertura ui   automator spoon jacoco x2   Quality   checks   (Checkstyle  +   findbugs  +   PMD  +  lint) Sonar
  • 22. 22   Android Lint Sonar plugin # analyse code (pmd, checkstyle, findbugs, lint) and report in sonar! > mvn sonar:sonar –P jacoco! hOps://github.com/SonarCommunity/sonar-­‐android  
  • 23. 23   Not an archetype (see akquinet : http://goo.gl/O46LIw) Only samples Do not use everything ! Pick up what you need !
  • 24. 24   Return of real life experience Maven   Jenkins   Sonar  (PMD,  checkstyle,  findbugs,  lint)   Junit  (Instrumenta[onTestCase)   ~  100  screens  (phone  +  tablet)   ~  5  developers  during  only  5  months   ~  60k  loc  (java),  15k  loc  (xml)   ~  400  unit  tests  :  not  an  excep[onal  coverage  (~  30%)   Built  on  each  commit  on  Jenkins  +  Genymo[on   0  lint,  pmd,  findbugs,  checkstyle  viola[ons   1  sonar  report  generated  each  night  with  those  metrics     è  An  happy  customer  J  
  • 25. 25   Lessons learned A  laborious  development  environment  :   eclipse  +  maven  +  m2eclipse  +  android  m2e  connector   è Many  hours  lost  è  Use  IntelliJ  !     A  laborious  execu[on  environment  :  emulator   è  Too  slow  è  Use  Genymo[on  (or  at  least  a  device)  !     Not  enough  tests  :   è Instrumenta[onTestCase  are  too  heavy/slow  for  Unit  Tes[ng     è Use  Robolectric  and/or  think  about  MV*  paOern   è  Keep  Instrumenta[onTestCase  for  Android  specific  (Ac[vity,   Services,  …)    
  • 26. 26   Lessons learned A  robust  development  environment  :   eclipse  +  maven  +  m2eclipse  +  android  m2e  connector   è  s[ll  some  problem  with  eclipse  and  maven  integra[on     About  tests   è Instrumenta[onTestCase  are  fast  enough  with  GenyMo[on   è  Robolectric  can’t  give  you  enough  confidence      
  • 27. 27   5 Quality Tools Android Gradle
  • 28. 28   Before     V  0.6   Lint UIAutomator Monkey & Monkey Runner Robolectric PMD, checkstyle, findbugs Emma, Cobertura, Jacoco
  • 30. 30   V  0.6.+   Lint UIAutomator Monkey & Monkey Runner Robolectric PMD, checkstyle, findbugs Emma, Cobertura, Jacoco
  • 31. 31   Quality # # > # > the gradle way run junit, robotium, robolectric tests ! AND Chekstyle + PMD + Findbugs + Classycle! gradle check! report in sonar! gradle sonarRunner!
  • 32. 32   6 Conclusion Android is filling the gap
  • 33. Gradle Feature Application Variants & Manifest merging Standard  tests  &  Robo,um Code  Coverage   Robolectric UI  automator  /  Monkey  /   Monkey  Runner PMD  /  CheckStyle  /   FindBgugs  /  Classycle  /  Lint Sonar  &  Project  Sites 0.6.1 VS Maven Gradle Maven ? 33   3.6.1
  • 34. Android offers 34   lots of quality tools lots of testing methods rapid testing Everything gets easier to use Build rock solid apps
  • 35. 35   Thank You ! Any Question ? stephanenicolas   jeromevdl   snicolas   @jeromevdl   Stéphane Nicolas & Jérôme Van Der Linden +stephane  nicolas   +jerome  van  der  linden  
  • 36. 36   Quality Tools for Android http://goo.gl/zGFvda