SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Continuous
Integration for
Android – How
Google does it
Vladimir Miloševic
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
Š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
Alati
Findbugs
Lint
Gerrit
Continous Integration
Commit to
Gerrit
Build, Run test
Static code analysis
Result: +1
Peer review
+1
Architect
approval
+2
Merge
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
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.
Jenkins job
• Trigger on commit, nightly job
• Checkout code
• Build
• Run tests on device or emulator
• Run code analysis
• Run monkey test
Automatizovani testovi
• Funkcionalni testovi:
– Roboelectric
– Android Testing
• UI testovi:
– UI Automator
– Robotium
• Monkey test
• Šta testirati, odakle početi
Statička analiza koda
• Lint
• Findbugs
• Coverity
• Protex
• Popraviti kritične greške i izbegavati dodavanje
novih
Peer review
• Verifikovanje izmene
• Provera da li je neka druga funkcionalnost
pokvarena
• Provera kvaliteta koda – coding standard,
formatting, refactoring
• Testiranje
• Peer review +1
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
Šta je specifično za Android
• Testiranje na različitim uređajima
• Cloud remote testing
• Deployment faza
Promenite navike
• Pravite male komitove, sa jasno definisanim
izmenama funkcionalnosti
• Pišite unit testove
• Kod pripada celom timu, ne autorima
Primenjivost u Startup-u
• Kolika je investicija postaviti ovakav proces
• Koliko treba održavanja
• Koji su benefiti
• Kada u projekat uvesti CI
posao@pstech.rs
@PSTechSerbia PSTech PSTechSerbia
praksa@pstech.rs
Thank You!

Weitere ähnliche Inhalte

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Empfohlen (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Continuous Integration for Android – How Google does it

  • 1. Continuous Integration for Android – How Google does it Vladimir Miloševic
  • 2. 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
  • 3. Š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
  • 5. Continous Integration Commit to Gerrit Build, Run test Static code analysis Result: +1 Peer review +1 Architect approval +2 Merge
  • 6. 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
  • 7. 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.
  • 8. Jenkins job • Trigger on commit, nightly job • Checkout code • Build • Run tests on device or emulator • Run code analysis • Run monkey test
  • 9. Automatizovani testovi • Funkcionalni testovi: – Roboelectric – Android Testing • UI testovi: – UI Automator – Robotium • Monkey test • Šta testirati, odakle početi
  • 10. Statička analiza koda • Lint • Findbugs • Coverity • Protex • Popraviti kritične greške i izbegavati dodavanje novih
  • 11. Peer review • Verifikovanje izmene • Provera da li je neka druga funkcionalnost pokvarena • Provera kvaliteta koda – coding standard, formatting, refactoring • Testiranje • Peer review +1
  • 12. 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
  • 13. Šta je specifično za Android • Testiranje na različitim uređajima • Cloud remote testing • Deployment faza
  • 14. Promenite navike • Pravite male komitove, sa jasno definisanim izmenama funkcionalnosti • Pišite unit testove • Kod pripada celom timu, ne autorima
  • 15. Primenjivost u Startup-u • Kolika je investicija postaviti ovakav proces • Koliko treba održavanja • Koji su benefiti • Kada u projekat uvesti CI

Hinweis der Redaktion

  1. (a) Koliko od vas je pisao Android aplikacije? (b) Koliko od vas se profesionalno bavi razvojem Android aplikacija?
  2. sta je to continous integration sta ovaj proces donosi izbegavanje integracionih problema poboljsanje kvaliteta kontinualnom kontrolom lakse odrzavanje smanjivanje tehnickog duga povecava transparentnost projekta lakse uocavanje gresaka poboljsava komunikaciju u timu
  3. source controll build server review server alati za staticku analizu koda
  4. -kako izgleda jedan ciklus
  5. Izmene u kodu coding standard https://source.android.com/source/code-style.html formatiranje koda – eclipse formatter refaktoring http://sourcemaking.com/refactoring
  6. Brancing strategy – fix for, main, maintenance, feature branch
  7. Šta sve radi jenkins job Kako se konfigurise – jenkins plugins Trigerovanje na komit, specijalni job-ovi Integracija sa gerritom +1 verified Test na uredjaju ili emulatoru
  8. Sta treba sve pokriti testovima Odnos cena-pokrivenost Testirati parsiranje, serializaciju, algoritme, formattere Gui smoke tests google email https://android.googlesource.com/platform/packages/apps/Email/+/master
  9. Sta radi svaki od ovih alata i na sta se fokusira Sta raditi sa false positive greskama
  10. kolika je investicija postviti ovakav proces koliko treba odrzavanja koji su benefiti kada u projekat uvesti CI Inicijalna investicija od par nedelja dok se ne postav svi alati
  11. Zahvali se ljudima!