SlideShare uma empresa Scribd logo
1 de 40
Building High Quality Android
            Apps
  By using Jenkins and Automated Device
                    Tests
Getting to know each other...

Leif Janzik
Team-Lead Android Development
adesso mobile solutions GmbH

Twitter: @ElliotMonster
Blog: www.thoughtsonmobile.com
About adesso mobile solutions GmbH

•   adesso mobile solutions GmbH, Dortmund, 65 MA (Ende 2012)
•   Tochterunternehmen der adesso AG, Dortmund, ca. 1.100 MA
    (Ende 2012)
•   führender Anbieter in den Bereichen mobiles Internet, mobile
    Applikationen und Mobile Marketing
•   Portfolio: Beratung, Konzeption, Realisierung, Review, Test und
    Betrieb von Mobilisierungs-Projekten und App-Lösungen
•   Kunden: Über 200 realisierten Portalen und Applikationen für
    Kunden wie Daimler, PAYBACK, ERGO, süddeutsche.de,
    SportScheck, die Volksbanken Raffeisenbanken, Bundesagentur
    für Arbeit.
So you are an Android Developer
 and everything is f***ing awesome...



http://www.flickr.com/photos/fullcodepress/
Everyone loves your Apps



http://www.flickr.com/photos/fullcodepress/
Your companies headquarter
looks like these



http://www.flickr.com/photos/fullcodepress/
Everything is perfect!



http://www.flickr.com/photos/fullcodepress/
BUT

http://www.flickr.com/photos/fullcodepress/
... time goes on, and the apps evolves,
new features, new API-levels, bugfixes etc.
http://www.flickr.com/photos/fullcodepress/
There are „some“ new devices ...
... every day
http://www.flickr.com/photos/fullcodepress/
And after some Versions, Refactorings
& new Features your Code looks more like this...
you try to keep everything fine
and running...
... but the number of bugs
continues to grow ...
maybe your customers will react
like this?
... but more likely they will
react like this ...
... Your companies new
headquarter ...
... and being a Android Developer
is no fun no more.
Ok, maybe I exagerated a bit, BUT

•   Android Apps grow more and more complex
•   Customers expect a bugfree and undisturbed App
    experience
•   Tolerance even for minor bugs continues to shrink
•   Device fragmentation makes testing a sisysphean task
Some „everyday-problems“ we had to solve

•   Apps have to be build in many different Versions (e.g.
    Development/Staging-Enviroment) or different brandings
•   Developers are often disturbed, e.g. when a AdHoc for the
    customer is needed
•   Changes in App Components lead to new bugs, which
    were discovered later.
so what is the solution to this problem?
exessive Testing ...
but testing your own app is
soooooo boring! (so it might be skipped or not done thoroughly)
that‘s why we automated much of
our testing and our build process.
„Our“ solution

•   a clean and reliable development workflow
•   a toolchain which supports the developers and keeps
    disturbing work away
•   Continuous refactoring of the apps
•   Maven for lesser configuration for every developer and
    easier modularisation
•   Automated Device Tests
•   Continuous integration
What is Continuous Integration?
• Automate everything

• Build as often as possible
    • Build early, build often
    • e.g. on every commit
    • or nightly builds
Benefits of Continuous Integration
• Fewer Errors
   • very important, not everybody installs every update, so
      bugs might never be fixed on a customers device
• Fast Feedback
• Tests everything on every (nightly) build
• Much less manual testing
   • Cheaper
   • Happier developers
• Regression-Tests without additional effort
Automate...
• ...Builds
• ...Unit Testing
• ...Device Tests
• ...Code Coverage & Static Analysis
• ...Deployment
3 Major Build Profiles

Build after Commit        Nightly Build           Release or Promoted Build
• Build and archive APK   • Build Project         •   Build APK
• Run Unit-Tests            without               •   Run Unit-Tests
• Run Sonar Code            archiving/publishin   •   Run Calabash Tests
  Metrics                   g APK                 •   Keep apk „forever“
                          • Run Unit-Tests        •   upload apk to webserver
                          • Run Calabash Tests        for enterprise delivery or
                                                      to Google play
Why did we choose Jenkins
• Quasi-Standart CI Server (together with hudson)
• A lot of useful plugins
   • e.g. Maven Plugin, Checkstyle
      Plugin, Android Lint Plugin,
      Sonar Plugin
• Well documented Plugin API for
  own plugins
Our Jenkins System
                       Jenkins
                       Master




Jenkins      Jenkins             Jenkins   Jenkins
iOS          Android             Windows   Mobile
                                           Web
Automate...
• ...Builds
• ...Unit Testing
• ...Device Tests
• ...Code Coverage & Static Analysis
• ...Deployment
why do we need automated ui-tests?
• Not all parts are covered by classic Unit-Tests
• Manual Integration Tests take a lot of time
• Manual tests are very boring and developers tend to skip
  them
• Device fragmentation grows every day ...
automated UI-Tests with Calabash
• Cucumber based Testing Tool
• Test-Specs are human readable, even for non-programmers
• Both mayor platforms iOS & Android are supported with a identical
  Syntax
• Runs in Simulator/Emulator and on Devices
Example
Feature: Basic Mathematics
  As a user I‘ll be able to do basic mathematic
  operations

  Scenario: Summate 2 numbers
    Given I started the App
    When I press button „5“
    And I press button „+“
    And I press button „3“
    And I press button „=“
    Then label „result“ should be „8“

  Scenario: Substract one number from another
    Given I started the App
    When I press button „9“
    And I press button „-“
    And I press button „4“
    And I press button „=“
    Then label „result“ should be „5“
• All Calabash-Tests run on real Devices, so
  the results are much more reliable
Automate...
• ...Builds
• ...Unit Testing
• ...Device Tests
• ...Code Coverage & Static Analysis
• ...Deployment
Publish Code Analysis Results to Sonar
Automate...
• ...Builds
• ...Unit Testing
• ...Device Tests
• ...Code Coverage & Static Analysis
• ...Deployment
Any questions?
Thank you
           Have a nice day at DroidCon
PS: if you are an StartUp or have a great idea (for mobile) ask me for
              informations on the „adesso mobile fond“

Mais conteúdo relacionado

Mais procurados

SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in MindSauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
Sauce Labs
 

Mais procurados (20)

How to pass a coding interview as an automation developer talk - Oct 17 2016
How to pass a coding interview as an automation developer talk - Oct 17 2016How to pass a coding interview as an automation developer talk - Oct 17 2016
How to pass a coding interview as an automation developer talk - Oct 17 2016
 
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Espresso testing
Espresso testingEspresso testing
Espresso testing
 
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
Simplify CI with the Updated Jenkins Plugin for Sauce LabsSimplify CI with the Updated Jenkins Plugin for Sauce Labs
Simplify CI with the Updated Jenkins Plugin for Sauce Labs
 
Selenium Conference 2015 - Mobile Selenium Grid Setup
Selenium Conference 2015 - Mobile Selenium Grid SetupSelenium Conference 2015 - Mobile Selenium Grid Setup
Selenium Conference 2015 - Mobile Selenium Grid Setup
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applications
 
SauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital EditionSauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital Edition
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
 
Belfast Selenium Meetup
Belfast Selenium MeetupBelfast Selenium Meetup
Belfast Selenium Meetup
 
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in MindSauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
 
Continuous Testing Odyssey: Learn Best Practices for End-to-End Web App Testing
Continuous Testing Odyssey: Learn Best Practices for End-to-End Web App TestingContinuous Testing Odyssey: Learn Best Practices for End-to-End Web App Testing
Continuous Testing Odyssey: Learn Best Practices for End-to-End Web App Testing
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
SauceCon 2017: Testing @ the Speed of Concurrency
SauceCon 2017: Testing @ the Speed of ConcurrencySauceCon 2017: Testing @ the Speed of Concurrency
SauceCon 2017: Testing @ the Speed of Concurrency
 
Selenium Camp 2016
Selenium Camp 2016Selenium Camp 2016
Selenium Camp 2016
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
Scaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and KubernetesScaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and Kubernetes
 

Destaque

Destaque (13)

Continuous Mobile - Testing Using Jenkins - A How To Guide
Continuous Mobile - Testing Using Jenkins - A How To GuideContinuous Mobile - Testing Using Jenkins - A How To Guide
Continuous Mobile - Testing Using Jenkins - A How To Guide
 
How to Set Up Mobile Continuous Integration with Real Devices: CloudBees & SO...
How to Set Up Mobile Continuous Integration with Real Devices: CloudBees & SO...How to Set Up Mobile Continuous Integration with Real Devices: CloudBees & SO...
How to Set Up Mobile Continuous Integration with Real Devices: CloudBees & SO...
 
Accelerate Web and Mobile Testing for Continuous Integration and Delivery
Accelerate Web and Mobile Testing for Continuous Integration and DeliveryAccelerate Web and Mobile Testing for Continuous Integration and Delivery
Accelerate Web and Mobile Testing for Continuous Integration and Delivery
 
Mobile App Quality Roadmap for DevTest Teams
Mobile App Quality Roadmap for DevTest TeamsMobile App Quality Roadmap for DevTest Teams
Mobile App Quality Roadmap for DevTest Teams
 
Genymotion with Jenkins
Genymotion with JenkinsGenymotion with Jenkins
Genymotion with Jenkins
 
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
 
Robotium framework & Jenkins CI tools - TdT@Cluj #19
Robotium framework & Jenkins CI tools - TdT@Cluj #19Robotium framework & Jenkins CI tools - TdT@Cluj #19
Robotium framework & Jenkins CI tools - TdT@Cluj #19
 
Automated android testing using jenkins ci
Automated android testing using jenkins ciAutomated android testing using jenkins ci
Automated android testing using jenkins ci
 
The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20
The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20
The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar SeriesMobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
 
Smtp errors
Smtp errorsSmtp errors
Smtp errors
 
Continous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and Jenkins
 

Semelhante a Building High Quality Android Applications

Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 

Semelhante a Building High Quality Android Applications (20)

Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
When & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile ApplicationsWhen & How to Successfully use Test Automation for Mobile Applications
When & How to Successfully use Test Automation for Mobile Applications
 
Hudson
HudsonHudson
Hudson
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
CI/CD for mobile at HERE
CI/CD for mobile at HERECI/CD for mobile at HERE
CI/CD for mobile at HERE
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Building High Quality Android Applications

  • 1. Building High Quality Android Apps By using Jenkins and Automated Device Tests
  • 2. Getting to know each other... Leif Janzik Team-Lead Android Development adesso mobile solutions GmbH Twitter: @ElliotMonster Blog: www.thoughtsonmobile.com
  • 3. About adesso mobile solutions GmbH • adesso mobile solutions GmbH, Dortmund, 65 MA (Ende 2012) • Tochterunternehmen der adesso AG, Dortmund, ca. 1.100 MA (Ende 2012) • führender Anbieter in den Bereichen mobiles Internet, mobile Applikationen und Mobile Marketing • Portfolio: Beratung, Konzeption, Realisierung, Review, Test und Betrieb von Mobilisierungs-Projekten und App-Lösungen • Kunden: Über 200 realisierten Portalen und Applikationen für Kunden wie Daimler, PAYBACK, ERGO, süddeutsche.de, SportScheck, die Volksbanken Raffeisenbanken, Bundesagentur für Arbeit.
  • 4. So you are an Android Developer and everything is f***ing awesome... http://www.flickr.com/photos/fullcodepress/
  • 5. Everyone loves your Apps http://www.flickr.com/photos/fullcodepress/
  • 6. Your companies headquarter looks like these http://www.flickr.com/photos/fullcodepress/
  • 9. ... time goes on, and the apps evolves, new features, new API-levels, bugfixes etc. http://www.flickr.com/photos/fullcodepress/
  • 10. There are „some“ new devices ... ... every day http://www.flickr.com/photos/fullcodepress/
  • 11. And after some Versions, Refactorings & new Features your Code looks more like this...
  • 12. you try to keep everything fine and running...
  • 13. ... but the number of bugs continues to grow ...
  • 14. maybe your customers will react like this?
  • 15. ... but more likely they will react like this ...
  • 16. ... Your companies new headquarter ...
  • 17. ... and being a Android Developer is no fun no more.
  • 18. Ok, maybe I exagerated a bit, BUT • Android Apps grow more and more complex • Customers expect a bugfree and undisturbed App experience • Tolerance even for minor bugs continues to shrink • Device fragmentation makes testing a sisysphean task
  • 19. Some „everyday-problems“ we had to solve • Apps have to be build in many different Versions (e.g. Development/Staging-Enviroment) or different brandings • Developers are often disturbed, e.g. when a AdHoc for the customer is needed • Changes in App Components lead to new bugs, which were discovered later.
  • 20. so what is the solution to this problem?
  • 22. but testing your own app is soooooo boring! (so it might be skipped or not done thoroughly)
  • 23. that‘s why we automated much of our testing and our build process.
  • 24. „Our“ solution • a clean and reliable development workflow • a toolchain which supports the developers and keeps disturbing work away • Continuous refactoring of the apps • Maven for lesser configuration for every developer and easier modularisation • Automated Device Tests • Continuous integration
  • 25. What is Continuous Integration? • Automate everything • Build as often as possible • Build early, build often • e.g. on every commit • or nightly builds
  • 26. Benefits of Continuous Integration • Fewer Errors • very important, not everybody installs every update, so bugs might never be fixed on a customers device • Fast Feedback • Tests everything on every (nightly) build • Much less manual testing • Cheaper • Happier developers • Regression-Tests without additional effort
  • 27. Automate... • ...Builds • ...Unit Testing • ...Device Tests • ...Code Coverage & Static Analysis • ...Deployment
  • 28. 3 Major Build Profiles Build after Commit Nightly Build Release or Promoted Build • Build and archive APK • Build Project • Build APK • Run Unit-Tests without • Run Unit-Tests • Run Sonar Code archiving/publishin • Run Calabash Tests Metrics g APK • Keep apk „forever“ • Run Unit-Tests • upload apk to webserver • Run Calabash Tests for enterprise delivery or to Google play
  • 29. Why did we choose Jenkins • Quasi-Standart CI Server (together with hudson) • A lot of useful plugins • e.g. Maven Plugin, Checkstyle Plugin, Android Lint Plugin, Sonar Plugin • Well documented Plugin API for own plugins
  • 30. Our Jenkins System Jenkins Master Jenkins Jenkins Jenkins Jenkins iOS Android Windows Mobile Web
  • 31. Automate... • ...Builds • ...Unit Testing • ...Device Tests • ...Code Coverage & Static Analysis • ...Deployment
  • 32. why do we need automated ui-tests? • Not all parts are covered by classic Unit-Tests • Manual Integration Tests take a lot of time • Manual tests are very boring and developers tend to skip them • Device fragmentation grows every day ...
  • 33. automated UI-Tests with Calabash • Cucumber based Testing Tool • Test-Specs are human readable, even for non-programmers • Both mayor platforms iOS & Android are supported with a identical Syntax • Runs in Simulator/Emulator and on Devices
  • 34. Example Feature: Basic Mathematics As a user I‘ll be able to do basic mathematic operations Scenario: Summate 2 numbers Given I started the App When I press button „5“ And I press button „+“ And I press button „3“ And I press button „=“ Then label „result“ should be „8“ Scenario: Substract one number from another Given I started the App When I press button „9“ And I press button „-“ And I press button „4“ And I press button „=“ Then label „result“ should be „5“
  • 35. • All Calabash-Tests run on real Devices, so the results are much more reliable
  • 36. Automate... • ...Builds • ...Unit Testing • ...Device Tests • ...Code Coverage & Static Analysis • ...Deployment
  • 37. Publish Code Analysis Results to Sonar
  • 38. Automate... • ...Builds • ...Unit Testing • ...Device Tests • ...Code Coverage & Static Analysis • ...Deployment
  • 40. Thank you Have a nice day at DroidCon PS: if you are an StartUp or have a great idea (for mobile) ask me for informations on the „adesso mobile fond“