SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
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	

! 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	

! 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	


Quality Tools Available on Android
Quality Tools
For Android
Calabash
Mockito
Robotium
UI
Automator
Robo
lectric
JUnit
Jenkins
Sonar
Maven
Ant
Geny
Motion
Emulator
Vogar
Emma Jacoco
Lint
PMD
CheckSt
yle
findbugs
EasyMock
Cobertura
Device
FEST-
Android
Spoon
Test Tools	

 Reporting Tools	

Code coverage	

Graddle
Monkey
Monkey
Runner
5	

https://github.com/stephanenicolas/Quality-Tools-for-Android	

(http://goo.gl/pdwnq)
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
JenkinsMaven
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 Plugin
Sonar LintPMD Check
Style
findbugsEmma Cobertura
Initial setup :: Sonar
Jacoco
Thanks to Thomas Bores  Florian Roncari
for their contributions to the sonar lint plugin.
8	

# 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.
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	

Maven profiles
Junit + Robotium Robolectric UIAutomator Code coverage
Quality checks
(Checkstyle +
findbugs +
PMD + lint)
Sonar
standard
emma
cobertura
ui
automator
spoon
jacoco
11	

Standard profile :
Running tests and Quality checks
Robo	

lectric	

Robotium	

 JUnit	

 UI
Automator	

Lint PMD Check
Style
findbugs
# run all tests	

 mvn clean install
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
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
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
SonarLint PMD Check
Style
findbugs
Robo	

tium	

JUnit
15	

UI Automator profile :
Running UI Automator tests
# run UI Automator tests	

 mvn clean install –P uiautomator	

	

 mvn sonar:sonar –P uiautomator	

UI
Autom
ator	

Sonar
Lint PMD
Check
Stylefindbugs
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
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
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 Check
Style
findbugs Sonar
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
20	

https://github.com/stephanenicolas/Quality-Tools-for-Android
(http://goo.gl/pdwnq)
Live Demo
21	

Question and comments ?

Más contenido relacionado

Similar a Optimize Android Apps with Java Tools

Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentJustin James
 
PhoneGap Day 2016 USA
PhoneGap Day 2016 USAPhoneGap Day 2016 USA
PhoneGap Day 2016 USARyan J. Salva
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesMatteo Bonifazi
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonargaudol
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
Continuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeContinuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeEmre Dündar
 
Learning android with AOSP
Learning android with AOSPLearning android with AOSP
Learning android with AOSPJorge Barroso
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android StudioRamon Ribeiro Rabello
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testinghugs
 
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, Palm
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, PalmBattle of Music: SDK from iPhone, Nokia, BlackBerry, Android, Palm
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, PalmBess Ho
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumEmergya
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Oscon presentation
Oscon presentationOscon presentation
Oscon presentationgarrettmoon
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, GreenrobotDroidcon Berlin
 
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...Ron Werner
 

Similar a Optimize Android Apps with Java Tools (20)

Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 
PhoneGap Day 2016 USA
PhoneGap Day 2016 USAPhoneGap Day 2016 USA
PhoneGap Day 2016 USA
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Descubre Android
Descubre AndroidDescubre Android
Descubre Android
 
mydevops.pptx
mydevops.pptxmydevops.pptx
mydevops.pptx
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devices
 
Opencv
OpencvOpencv
Opencv
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Continuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeContinuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQube
 
Learning android with AOSP
Learning android with AOSPLearning android with AOSP
Learning android with AOSP
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android Studio
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, Palm
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, PalmBattle of Music: SDK from iPhone, Nokia, BlackBerry, Android, Palm
Battle of Music: SDK from iPhone, Nokia, BlackBerry, Android, Palm
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Oscon presentation
Oscon presentationOscon presentation
Oscon presentation
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...
Dragons & Knights - Calabash and Cucumber as Automation Tools for Hybrid Apps...
 

Más de jeromevdl

Message-Driven Architecture on AWS
Message-Driven Architecture on AWSMessage-Driven Architecture on AWS
Message-Driven Architecture on AWSjeromevdl
 
Do more with less code in serverless
Do more with less code in serverlessDo more with less code in serverless
Do more with less code in serverlessjeromevdl
 
Do more with less code in a serverless world
Do more with less code in a serverless worldDo more with less code in a serverless world
Do more with less code in a serverless worldjeromevdl
 
DevopsDays Geneva 2020 - Compliance & Governance as Code
DevopsDays Geneva 2020 - Compliance & Governance as CodeDevopsDays Geneva 2020 - Compliance & Governance as Code
DevopsDays Geneva 2020 - Compliance & Governance as Codejeromevdl
 
Softshake 2017 - Développer un chatbot Alexa
Softshake 2017 - Développer un chatbot AlexaSoftshake 2017 - Développer un chatbot Alexa
Softshake 2017 - Développer un chatbot Alexajeromevdl
 
Chatbots buzzword ou nouvel eldorado
Chatbots   buzzword ou nouvel eldoradoChatbots   buzzword ou nouvel eldorado
Chatbots buzzword ou nouvel eldoradojeromevdl
 
Management projet vs management produit
Management projet vs management produitManagement projet vs management produit
Management projet vs management produitjeromevdl
 
Softshake - Offline applications
Softshake - Offline applicationsSoftshake - Offline applications
Softshake - Offline applicationsjeromevdl
 
DroidconUK 2013 : Beef up android apps with java tools
DroidconUK 2013 : Beef up android apps with java toolsDroidconUK 2013 : Beef up android apps with java tools
DroidconUK 2013 : Beef up android apps with java toolsjeromevdl
 
Jug Lausanne Android Janvier2013
Jug Lausanne Android Janvier2013Jug Lausanne Android Janvier2013
Jug Lausanne Android Janvier2013jeromevdl
 

Más de jeromevdl (11)

Message-Driven Architecture on AWS
Message-Driven Architecture on AWSMessage-Driven Architecture on AWS
Message-Driven Architecture on AWS
 
Do more with less code in serverless
Do more with less code in serverlessDo more with less code in serverless
Do more with less code in serverless
 
Do more with less code in a serverless world
Do more with less code in a serverless worldDo more with less code in a serverless world
Do more with less code in a serverless world
 
DevopsDays Geneva 2020 - Compliance & Governance as Code
DevopsDays Geneva 2020 - Compliance & Governance as CodeDevopsDays Geneva 2020 - Compliance & Governance as Code
DevopsDays Geneva 2020 - Compliance & Governance as Code
 
Softshake 2017 - Développer un chatbot Alexa
Softshake 2017 - Développer un chatbot AlexaSoftshake 2017 - Développer un chatbot Alexa
Softshake 2017 - Développer un chatbot Alexa
 
Chatbots buzzword ou nouvel eldorado
Chatbots   buzzword ou nouvel eldoradoChatbots   buzzword ou nouvel eldorado
Chatbots buzzword ou nouvel eldorado
 
Management projet vs management produit
Management projet vs management produitManagement projet vs management produit
Management projet vs management produit
 
Softshake - Offline applications
Softshake - Offline applicationsSoftshake - Offline applications
Softshake - Offline applications
 
DroidconUK 2013 : Beef up android apps with java tools
DroidconUK 2013 : Beef up android apps with java toolsDroidconUK 2013 : Beef up android apps with java tools
DroidconUK 2013 : Beef up android apps with java tools
 
Jug Lausanne Android Janvier2013
Jug Lausanne Android Janvier2013Jug Lausanne Android Janvier2013
Jug Lausanne Android Janvier2013
 
Metroide
MetroideMetroide
Metroide
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Optimize Android Apps with Java Tools

  • 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 Quality Tools Available on Android Quality Tools For Android Calabash Mockito Robotium UI Automator Robo lectric JUnit Jenkins Sonar Maven Ant Geny Motion Emulator Vogar Emma Jacoco Lint PMD CheckSt yle findbugs EasyMock Cobertura Device FEST- Android Spoon Test Tools Reporting Tools Code coverage Graddle Monkey Monkey Runner
  • 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 from Intel #install X86 android emulator with Hardware Acceleration Support #install maven 3.0.3+ #install Jenkins #install Jenkins Android Emulator Plugin JenkinsMaven
  • 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 Plugin Sonar LintPMD Check Style findbugsEmma Cobertura Initial setup :: Sonar Jacoco Thanks to Thomas Bores Florian Roncari for their contributions to the sonar lint plugin.
  • 8. 8 # 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.
  • 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 Maven profiles Junit + Robotium Robolectric UIAutomator Code coverage Quality checks (Checkstyle + findbugs + PMD + lint) Sonar standard emma cobertura ui automator spoon jacoco
  • 11. 11 Standard profile : Running tests and Quality checks Robo lectric Robotium JUnit UI Automator Lint PMD Check Style findbugs # run all tests mvn clean install
  • 12. 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
  • 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 Cober tura Sonar Lint PMD Check Style findbugs
  • 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 Jacoco SonarLint PMD Check Style findbugs Robo tium JUnit
  • 15. 15 UI Automator profile : Running UI Automator tests # run UI Automator tests mvn clean install –P uiautomator mvn sonar:sonar –P uiautomator UI Autom ator Sonar Lint PMD Check Stylefindbugs
  • 16. 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
  • 17. 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
  • 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 Check Style findbugs Sonar
  • 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 ! Conclusion http://goo.gl/pdwnq