Download - Gtug nov 2010
![Page 1: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/1.jpg)
Markus Kopfarconsis IT-Solutions
CI & Android EntwicklungWie geht das?
![Page 2: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/2.jpg)
Agenda
• Motivation
• Wieso CI?• Typisches CI-System
• Demo
• Best Practices
![Page 3: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/3.jpg)
Bei mir geht’s!!!
Motivation
![Page 4: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/4.jpg)
Was ist CI?
Continuous Integration ist ein Prozess der das regelmäßige,
vollständige Bauen und Testen einer Anwendung beschreibt
![Page 5: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/5.jpg)
Wo CI? Wo nicht CI?
![Page 6: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/6.jpg)
Benefits aus Entwicklersicht
• Verfügbares Produkt
• Integrationsaufwand• Code Qualität
• Transparenz
• Automatisierter Release
![Page 7: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/7.jpg)
Benefits aus Managersicht
• Verfügbares Produkt
• Kontinuierliche Qualitätskontrolle• Reduzierung des Projektrisikos
• Bus Faktor
• Transparenz• Roadmap Planung
![Page 8: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/8.jpg)
Typisches CI-System
![Page 9: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/9.jpg)
CI-Artefakte Server
• Bamboo
• Cruise Control• Hudson
• Verwendung von Hudson weil– Viele Plug-ins
– Große Community– Sehr einfache Handhabung
– Optisch ansprechend
![Page 10: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/10.jpg)
CI-Artefakte Tools
• Ant– Build Skripte werden von Android initial
erstellt
• Maven– Verwendbar
![Page 11: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/11.jpg)
CI-Artefakte SCM
• SVN
• Git• CVS
• Verwendung von SVN– SVN + Hudson = gutes Team
– SVN ist sehr verbreitet– Etabliert
– IDE Support
![Page 12: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/12.jpg)
CI-Artefakte Tests
• Unit Tests
• Integration Test• Android Test-Framework
• UI Tests– Robotium
![Page 13: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/13.jpg)
CI-Artefakte Code
• Code Basis– NotePad Projekt
• Plattform– SDK (Android)
– Emulator / Device
![Page 14: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/14.jpg)
CI-Artefakte Reporting
• Testresults
• Statische Code-Analyse– Checkstyle
– PMD– Findbugs
– Sonar
– ...
![Page 15: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/15.jpg)
Mapping auf Android
![Page 16: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/16.jpg)
![Page 17: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/17.jpg)
Automatisiere Build-Prozess
Build testet ApplikationTeste produktionsnah
Halte Build-Prozess transparent
Automatisiere Deployment
![Page 18: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/18.jpg)
Nutze Metriken
Kurze Builds– Commit Build
– Nightly Build– Integration Build
![Page 19: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/19.jpg)
Fazit
• CI auch für Android
• Build-Prozess leicht aufsetzbar• Erfahrungswerte aus der JEE-Welt
vorhanden
• ABER:– Kein produktions-
nahes Testen
– Kein automatisches “Deployment”
![Page 20: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/20.jpg)
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/)
![Page 21: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/21.jpg)
![Page 22: Gtug nov 2010](https://reader034.vdokument.com/reader034/viewer/2022052213/555a446bd8b42ae1398b5068/html5/thumbnails/22.jpg)
mail [email protected] www.xing.com/profile/Markus_Kopflinkedin www.de.linkedin.com/in/markuskopf
twitter @kopf_markusblog www.markuskopf.blogspot.com/