continuous integration for android – how google does it
DESCRIPTION
How to ensure high quality while developing Android applications? Detailed description of the development process and tools which Google uses: code review, static analysis, automated tests, monkey testing... Experience form using these tools. How applicable are those tools for startups and rapid development?TRANSCRIPT
![Page 1: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/1.jpg)
Continuous Integration for Android – How Google does it
Vladimir Miloševic
![Page 2: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/2.jpg)
Continuous Integration
-Šta je to continous integration?-Šta ovaj proces donosi:
- izbegavanje integracionih problema,-poboljšanje kvaliteta kontinualnom kontrolom,- lakše odrzavanje,-kontrolisanje tehničkog duga.-povecava transparentnost projekta- ranije uočavanje grešaka-poboljšava komunikaciju u timu
![Page 3: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/3.jpg)
Šta dobijamo sa CI
• Uvek postoji bild aplikacije koji može da se instalira
• Najnovija verzija aplikacije je testirana • Možemo lako da ispratimo korake definisane u
Definition of Done
![Page 4: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/4.jpg)
Alati
Findbugs
Lint
Gerrit
![Page 5: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/5.jpg)
Continous Integration
Commit to Gerrit
Build, Run testStatic code analysisResult: +1
Peer review +1
Architect approval +2
Merge
![Page 6: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/6.jpg)
Izmene u kodu
• coding standard https://source.android.com/source/code-style.html
• formatiranje koda android-formatting.xml android.importorder
• refaktoring http://sourcemaking.com/refactoring
![Page 7: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/7.jpg)
Komitovanje na gerrit
• git-repo https://code.google.com/p/git-repo/• format komit poruke:
– kratak naslov,– opis izmena,– zavisnost od drugih izmena,– link na dizajn dokument, user story itd.
![Page 8: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/8.jpg)
Jenkins job
• Trigger on commit, nightly job• Checkout code• Build• Run tests on device or emulator• Run code analysis• Run monkey test
![Page 9: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/9.jpg)
Automatizovani testovi
• Funkcionalni testovi: – Roboelectric– Android Testing
• UI testovi: – UI Automator– Robotium
• Monkey test• Šta testirati, odakle početi
![Page 10: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/10.jpg)
Statička analiza koda
• Lint• Findbugs• Coverity• Protex• Popraviti kritične greške i izbegavati dodavanje
novih
![Page 11: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/11.jpg)
Peer review
• Verifikovanje izmene• Provera da li je neka druga funkcionalnost
pokvarena• Provera kvaliteta koda – coding standard,
formatting, refactoring• Testiranje• Peer review +1
![Page 12: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/12.jpg)
Architect approval
• Da li su svi koraci Definition of Done ispunjeni: – Da li su dodati novi testovi– Da li je napisana dokumentacija– itd.
• Da li se integriše u ispravan branch• Approval +2
![Page 13: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/13.jpg)
Šta je specifično za Android
• Testiranje na različitim uređajima• Cloud remote testing• Deployment faza
![Page 14: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/14.jpg)
Promenite navike
• Pravite male komitove, sa jasno definisanim izmenama funkcionalnosti
• Pišite unit testove • Kod pripada celom timu, ne autorima
![Page 15: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/15.jpg)
Primenjivost u Startup-u
• Kolika je investicija postaviti ovakav proces• Koliko treba održavanja• Koji su benefiti• Kada u projekat uvesti CI
![Page 17: Continuous Integration for Android – How Google does it](https://reader038.vdocuments.mx/reader038/viewer/2022102815/555e272fd8b42a6a4c8b4fda/html5/thumbnails/17.jpg)
Thank You!