Präsentation, die ich auf den Software Quality Days 2017 in Wien über Continuous Integration für Mobile Apps gehalten habe. Ich habe ein paar Online Services wie Bitrise, Greenhouse-CI und Visual Studio Team Services live demonstriert und die drei Schritte von Continuous Delivery praxisnah gezeigt, wie leicht sie auch für mobile Applikationen umsetzbar sind.
Hi, Alex, Zühlke, Responsible
Today talking about CI for mobile = CI for apps with special tricks
Main Goals of this talk:
Raise awareness, how easy it is to automate your build (including live-demonstrations)
Advocate the use of cloud services over on-premise solutions
Awakening desire to use this in your next project (Ultimately, you walk out of this talk and start using CIs for all your mobile projects)
Back in Camp 2014, everyone set up a Jenkins (himself), yet no one really did it in a project.
Tedious, actually quite boring, ... because it follows certain recipes that you have to do over and over again.
--> OPs had the same problem.
Started creating bash scripts to automate things
Vergleich mit Autofahren Safety in Development
What are you developing?
Mobile Apps
Web Apps
Desktop Apps
Other
What Version Control system do you use?
Nothing
SVN
Git
Other
What delivery method are you using?
Continuous Integration
Continuous Delivery
Manual Integration
Which tools are you using?
Jenkins
TeamCity
Travis
Cloud-Services (Bitrise, VSTS, …)
Continuous Integration is the practise of merging all developer working copies into a shared mainline several times a day.
Pro:
Integration bugs are detected early
Constant availability of “current” build for testing and release
Avoid dependency on individuals for building the app
If reverting is required, only small number of changes are lost
Avoid last-minute chaos before release
Contra:
Getting up and running is not trivial
Eventually costs money
Someone has to take care of it
A build is a procedure that takes an empty directory (and a known compilation environment) and builds the project from scratch, producing whatever you hope to produce as a final deliverable.
Hunt and Thomas - The pragmatic programmer
Ask audience, if this has ever happened to someone
def code = System.getenv("BITRISE_BUILD_NUMBER") as Integer ?: 0
android {
defaultConfig {
versionCode code
versionName "1.4." + code
...
Ask audience, if this has ever happened to someone
def code = System.getenv("BITRISE_BUILD_NUMBER") as Integer ?: 0
android {
defaultConfig {
versionCode code
versionName "1.4." + code
...
Once a person finds a bug, it should be the last time a person finds that bug. Automate a test for it
Hinweis an alle Entwickler: Man kann gar nicht zu faul sein, um UI-Tests zu schreiben, denn man braucht sich ja nur durchklicken: Immerhin gibt es ja einen UI-Test Recorder für alle Platformen!
Preise für automatisiertes Testen (ab):
0.05€ / Minute mit Xamarin Test Cloud
0.083€ / Minute mit Firebase
0.17€ / Minute mit AWS Devices Farm
https://console.firebase.google.com/project/sensor-fusion-demo/testlab/histories/bh.e860ec9debad3534/matrices/5949762492133157919
Erkenntnis: Warum braucht man überhaupt Tests auf echten Geräten? Weil es Probleme gibt, die man auf Emulatoren nicht findet.
Beinahe alle CIs haben Steps für das Deployment zu Google, da diese eine einfache API anbieten.
At 2.) Kniffliges Aufsetzen wird definitive besser Bessere Doku, bessere Services
Be aware that you will do a lot of updating and upgrading
-> Basically whenever I come back to my PC after a week, there are new updates available for Android, Xamarin, Mac, Windows, Build-Tools, Build-Agents, ...
Be aware that you will do some kind of scripting (bash, PS, python, whatever)
Your users will love you if you give them a well-crafted application and customers will pay you back if you save their money.