44
Test Driven Development (anche) su iOS @andreafrancia 30 novembre 2013 (Agile Day)

TDD anche su iOS

Embed Size (px)

DESCRIPTION

Test Driven Development su iOS è possibile e persino utile. Invece di leggere blog post che sottointendono che TDD su iOS sia difficile e inutile venite a vedere chi lo usa sul serio e ha il coraggio di programmare ad una conferenza davanti ad altre persone. Avvertenze: questo talk non contiene paternali sul perché si dovrebbe (o non si dovrebbe) fare TDD in questo talk non verranno usati strumenti complicati in questo talk verrà scritto ed eseguito codice dal vivo Dopo una brevissima introduzione passerò a sviluppare guidato dai test una semplice applicazione per iPhone.

Citation preview

Page 1: TDD anche su iOS

Test Driven Development (anche) su iOS

@andreafrancia 30 novembre 2013 (Agile Day)

Page 2: TDD anche su iOS

Agenda•10’ introduction •25’ live demo •10’ Q. & A.

Page 3: TDD anche su iOS

Introduction

Page 4: TDD anche su iOS
Page 5: TDD anche su iOS
Page 6: TDD anche su iOS
Page 7: TDD anche su iOS

Test-driven development (TDD) is a software development process

that relies on the repetition of a very short development cycle:

https://en.wikipedia.org/wiki/Test-driven_development

Page 8: TDD anche su iOS
Page 9: TDD anche su iOS
Page 10: TDD anche su iOS

(other than Xcode?)

Page 11: TDD anche su iOS
Page 12: TDD anche su iOS
Page 13: TDD anche su iOS
Page 14: TDD anche su iOS
Page 15: TDD anche su iOS
Page 16: TDD anche su iOS
Page 17: TDD anche su iOS
Page 18: TDD anche su iOS

Michael Feathers. 2004. Working Effectively with Legacy Code. Prentice Hall

Page 19: TDD anche su iOS

Michael Feathers. 2004. Working Effectively with Legacy Code. Prentice Hall

Page 20: TDD anche su iOS

Michael Feathers. 2004. Working Effectively with Legacy Code. Prentice Hall

Page 21: TDD anche su iOS
Page 22: TDD anche su iOS

• fast • reliable

• slow • fragile

Page 23: TDD anche su iOS

http://www.mountaingoatsoftware.com/blog/the-forgotten-layer-of-the-test-automation-pyramid

Page 24: TDD anche su iOS
Page 25: TDD anche su iOS
Page 26: TDD anche su iOS
Page 27: TDD anche su iOS

https://github.com/andreafrancia/CalendarKata

Page 28: TDD anche su iOS
Page 29: TDD anche su iOS
Page 30: TDD anche su iOS
Page 31: TDD anche su iOS

$ git clone [email protected]:andreafrancia/CalendarKata.git

$ cd ~/CalendarKata

$ git reset --hard

$ git clean -xdf

$ git checkout model-created-and-bound

$ open CalendarKata.xcodeproj

Page 32: TDD anche su iOS
Page 33: TDD anche su iOS
Page 34: TDD anche su iOS
Page 35: TDD anche su iOS

When refactor?

Page 36: TDD anche su iOS
Page 37: TDD anche su iOS
Page 38: TDD anche su iOS

http://www.neglectedpotential.com/2012/09/a-mind-map-for-ios-testing/

TDD is not about testing

Page 39: TDD anche su iOS

Why do I use TDD?

Page 40: TDD anche su iOS
Page 41: TDD anche su iOS

https://itunes.apple.com/app/natural-pomo/id687954557

Page 42: TDD anche su iOS
Page 43: TDD anche su iOS

@andreafrancia

Page 44: TDD anche su iOS