Slide 1

Slide 1 text

Best Practices für Continuous Integration mit iOS Stuttgart | 23.10.2012 | Felix Schulze www.immobilienscout24.de

Slide 2

Slide 2 text

Stuttgart | 23.10.2012 | Felix Schulze Continuous Integration • Werkzeug • für Risikominimierung und Qualitätssteigerung • Automatisierung • Beispiele: Jenkins, TeamCity, Bamboo, ...

Slide 3

Slide 3 text

Stuttgart | 23.10.2012 | Felix Schulze Bestandteile • Build-Management • Unit-Tests • Integration-Tests • Automatische Beta Versionen

Slide 4

Slide 4 text

Stuttgart | 23.10.2012 | Felix Schulze Aufbau für iOS CI Server Änderungen Ergebnisse Beta App Interner App Store Build Agent‘s

Slide 5

Slide 5 text

Stuttgart | 23.10.2012 | Felix Schulze Build Prozess Details Sourcecode Änderungen Kompilieren Unit-Tests Beta Version Integration-Tests Jede Stunde

Slide 6

Slide 6 text

Stuttgart | 23.10.2012 | Felix Schulze Build-Management • Viele Systeme (Bash, Gradle, Maven, ANT...) • Maven • Open Source Plugin für Xcode • Objektorientierte Lösung • Verbreitetes Build System • Viele Plugins • Viele Möglichkeiten

Slide 7

Slide 7 text

Stuttgart | 23.10.2012 | Felix Schulze • SenTesting • Direkt von Apple • Nur Gerät • Keine echte App • GH-Unit • Open Source • Simulator (über iOS-Sim) Unit-Tests

Slide 8

Slide 8 text

Stuttgart | 23.10.2012 | Felix Schulze • Dummy Objekte • Überprüfung von Aufrufen • OCMock Framework • id sampleMock = [OCMockObject mockForClass:[Sample class]]; • [[[sampleMock expect] andReturn:@"foo"] sampleFunc:@"Val"]; Mocking

Slide 9

Slide 9 text

Stuttgart | 23.10.2012 | Felix Schulze Demo

Slide 10

Slide 10 text

Stuttgart | 23.10.2012 | Felix Schulze • gcov - test coverage programm • LLVM Compiler Settings: • Instrument Programm Flow -> YES • Generate Test Coverage Files -> YES Code Coverage

Slide 11

Slide 11 text

Stuttgart | 23.10.2012 | Felix Schulze • lcov (graphical front-end für gcov) • Command Line Tool • HTML Reports • Highlighting von erreichtem Code • Coverstory • Grafisches Tool Coverage Reports

Slide 12

Slide 12 text

Stuttgart | 23.10.2012 | Felix Schulze Demo

Slide 13

Slide 13 text

Stuttgart | 23.10.2012 | Felix Schulze Integration-Tests • „Automatisierter Klicktest“ • KIF (Keep It Functional) • Tests in Objective-C • Test-Szenarios und Test-Schritte

Slide 14

Slide 14 text

Stuttgart | 23.10.2012 | Felix Schulze Demo

Slide 15

Slide 15 text

Stuttgart | 23.10.2012 | Felix Schulze Xcode-Maven-Plugin • Aktuelle Features: • App bauen • Simulator starten / beenden • GHUnit Tests • KIF Integration Tests • Test Coverage HTML Reports • IPA bauen • App Version anpassen (GIT)

Slide 16

Slide 16 text

Stuttgart | 23.10.2012 | Felix Schulze Automatische Beta Versionen • Interner App Store (jQuery Mobile) • Enterprise iOS Dev Account • Hockey App • Automatische Updates in der App • Crash Reports • Benutzungsstatistiken

Slide 17

Slide 17 text

Stuttgart | 23.10.2012 | Felix Schulze Links • Demo: https://github.com/ImmobilienScout24/iOS- Continuous-Integration-Demo • GH-Unit: https://github.com/gabriel/gh-unit • OCMock: https://github.com/erikdoe/ocmock • iOS-Sim: https://github.com/phonegap/ios-sim • KIF: https://github.com/square/KIF • Xcode-Maven-Plugin: https://github.com/x2on/xcode- maven-plugin • HockeySDK: https://github.com/bitstadium/ HockeySDK-iOS

Slide 18

Slide 18 text

Stuttgart | 23.10.2012 | Felix Schulze Vielen Dank für Ihre Aufmerksamkeit! Kontakt: Felix Schulze Immobilien Scout GmbH Andreasstraße 10 10243 Berlin URL: www.immobilienscout24.de Twitter: @x2on