Post on 19-May-2015
description
Markus Kopfarconsis IT-Solutions
CI & Android EntwicklungWie geht das?
Agenda
• Motivation
• Wieso CI?• Typisches CI-System
• Demo
• Best Practices
Bei mir geht’s!!!
Motivation
Was ist CI?
Continuous Integration ist ein Prozess der das regelmäßige,
vollständige Bauen und Testen einer Anwendung beschreibt
Wo CI? Wo nicht CI?
Benefits aus Entwicklersicht
• Verfügbares Produkt
• Integrationsaufwand• Code Qualität
• Transparenz
• Automatisierter Release
Benefits aus Managersicht
• Verfügbares Produkt
• Kontinuierliche Qualitätskontrolle• Reduzierung des Projektrisikos
• Bus Faktor
• Transparenz• Roadmap Planung
Typisches CI-System
CI-Artefakte Server
• Bamboo
• Cruise Control• Hudson
• Verwendung von Hudson weil– Viele Plug-ins
– Große Community– Sehr einfache Handhabung
– Optisch ansprechend
CI-Artefakte Tools
• Ant– Build Skripte werden von Android initial
erstellt
• Maven– Verwendbar
CI-Artefakte SCM
• SVN
• Git• CVS
• Verwendung von SVN– SVN + Hudson = gutes Team
– SVN ist sehr verbreitet– Etabliert
– IDE Support
CI-Artefakte Tests
• Unit Tests
• Integration Test• Android Test-Framework
• UI Tests– Robotium
CI-Artefakte Code
• Code Basis– NotePad Projekt
• Plattform– SDK (Android)
– Emulator / Device
CI-Artefakte Reporting
• Testresults
• Statische Code-Analyse– Checkstyle
– PMD– Findbugs
– Sonar
– ...
Mapping auf Android
Automatisiere Build-Prozess
Build testet ApplikationTeste produktionsnah
Halte Build-Prozess transparent
Automatisiere Deployment
Nutze Metriken
Kurze Builds– Commit Build
– Nightly Build– Integration Build
Fazit
• CI auch für Android
• Build-Prozess leicht aufsetzbar• Erfahrungswerte aus der JEE-Welt
vorhanden
• ABER:– Kein produktions-
nahes Testen
– Kein automatisches “Deployment”
Links• Hudson (http://hudson-ci.org/)• Cruise Control (http://cruisecontrol.sourceforge.net/)• Bamboo (http://www.atlassian.com/software/bamboo/)• Sonar (http://www.sonarsource.org/)• HudsonMobi (http://hudson-mobi.com/)• Robotium (http://code.google.com/p/robotium/)• Android Testing (http://developer.android.com/guide/topics/testing/
testing_android.html)• Pmd (http://pmd.sourceforge.net/)• Checkstyle (http://checkstyle.sourceforge.net/)• Findbugs (http://findbugs.sourceforge.net/)• Eclipse (http://eclipse.org/)• Ant (http://ant.apache.org/)
mail Markus.Kopf@arconsis.comxing www.xing.com/profile/Markus_Kopflinkedin www.de.linkedin.com/in/markuskopf
twitter @kopf_markusblog www.markuskopf.blogspot.com/