SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Unit Testing: Workshop Erfahrungen
(K)Eine Märchenstunde…


Frank Sons
Senior Software Engineer
Agata Raap
PHP Entwicklerin
Ein PHPUnit Märchen mit Happy End
                      Und einer Moral…




                                         2
Es war einmal…




                 3
Doch dann kam die böse Realität…




                                   4
Mit vielen bösen Fallen…




                           5
Ich dachte wir sind im Märchen?
               Ich wünsche mir ne Fee…




                                         6
Die Idee: Workshop!




                      7
Ein wenig Vorarbeit ist notwendig…




                                     8
Und dann gehts los…




                      9
Aber was ist mit den bösen Fallen?
      Keine Fee und kein Ritter, aber Entwickler…




                                                    10
Statische Probleme…




                      11
…auslagern!




              12
Abhängigkeiten…




                  13
…auslagern!




              14
Happy End in Sicht!
Moment, da fehlt noch was!




                             15
Die Moral von der Geschicht?




                               16
Und wenn sie nicht gestorben sind…




                                     17
Happy End!




             18
Best Practices… oder nicht?
           Diskussion ist eröffnet…




                                      19
Und los gehts…




                 20
Thanks!




          21
Bigpoint GmbH
Frank Sons & Agata Raap

   Drehbahn 47-48
   20354 Hamburg
      Germany

Tel +49 40.88 14 13 - 0
Fax +49 40.88 14 13 - 11

 f.sons@bigpoint.net
 a.raap@bigpoint.net
   www.bigpoint.net



  Find us on


                           22

Weitere ähnliche Inhalte

Andere mochten auch

Arbeit für Osterhasen
Arbeit für OsterhasenArbeit für Osterhasen
Arbeit für OsterhasenSylvi O.
 
Ley de Comercio Electrónico
Ley de Comercio ElectrónicoLey de Comercio Electrónico
Ley de Comercio ElectrónicoDayankru
 
Ticsenlaeducacion 131219085625-phpapp02
Ticsenlaeducacion 131219085625-phpapp02Ticsenlaeducacion 131219085625-phpapp02
Ticsenlaeducacion 131219085625-phpapp02Andrés Santy
 
Samsung YP-Q1 Bilder
Samsung YP-Q1 BilderSamsung YP-Q1 Bilder
Samsung YP-Q1 Bilderjulia135
 
D premios cervantes power
D premios cervantes powerD premios cervantes power
D premios cervantes powerdaniel.iglesias
 
Capas de sesión y presentación del modelo osi
Capas de sesión y presentación del modelo osiCapas de sesión y presentación del modelo osi
Capas de sesión y presentación del modelo osiRA Lopez
 
Filosofia escolastica
Filosofia escolasticaFilosofia escolastica
Filosofia escolasticaElianaandrea
 
Präsentation Referat
Präsentation ReferatPräsentation Referat
Präsentation Referatheibu
 
Payments, Social Media und Digital Natives
Payments, Social Media und Digital NativesPayments, Social Media und Digital Natives
Payments, Social Media und Digital Nativesfigo GmbH
 
Software educativo
Software educativoSoftware educativo
Software educativoKandy Mau
 
Diapositivas nuevas con cambio
Diapositivas nuevas con cambioDiapositivas nuevas con cambio
Diapositivas nuevas con cambioanamariacuicas
 
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5Jorge Veloza
 
Sistema institucional de evaluacion y promocion
Sistema institucional de evaluacion y promocionSistema institucional de evaluacion y promocion
Sistema institucional de evaluacion y promocionLuis Eduardo Hinestroza
 

Andere mochten auch (19)

Arbeit für Osterhasen
Arbeit für OsterhasenArbeit für Osterhasen
Arbeit für Osterhasen
 
Ley de Comercio Electrónico
Ley de Comercio ElectrónicoLey de Comercio Electrónico
Ley de Comercio Electrónico
 
Träume
TräumeTräume
Träume
 
Ticsenlaeducacion 131219085625-phpapp02
Ticsenlaeducacion 131219085625-phpapp02Ticsenlaeducacion 131219085625-phpapp02
Ticsenlaeducacion 131219085625-phpapp02
 
Samsung YP-Q1 Bilder
Samsung YP-Q1 BilderSamsung YP-Q1 Bilder
Samsung YP-Q1 Bilder
 
D premios cervantes power
D premios cervantes powerD premios cervantes power
D premios cervantes power
 
Capas de sesión y presentación del modelo osi
Capas de sesión y presentación del modelo osiCapas de sesión y presentación del modelo osi
Capas de sesión y presentación del modelo osi
 
Presentación1
Presentación1Presentación1
Presentación1
 
Filosofia escolastica
Filosofia escolasticaFilosofia escolastica
Filosofia escolastica
 
El molí de Bramasacs
El molí de BramasacsEl molí de Bramasacs
El molí de Bramasacs
 
Präsentation Referat
Präsentation ReferatPräsentation Referat
Präsentation Referat
 
Teresa
TeresaTeresa
Teresa
 
Ciudad wimax
Ciudad wimaxCiudad wimax
Ciudad wimax
 
Payments, Social Media und Digital Natives
Payments, Social Media und Digital NativesPayments, Social Media und Digital Natives
Payments, Social Media und Digital Natives
 
Software educativo
Software educativoSoftware educativo
Software educativo
 
Itzayana Zepeda Ortiz'
Itzayana Zepeda Ortiz'Itzayana Zepeda Ortiz'
Itzayana Zepeda Ortiz'
 
Diapositivas nuevas con cambio
Diapositivas nuevas con cambioDiapositivas nuevas con cambio
Diapositivas nuevas con cambio
 
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5
TRABAJO FINAL EXPRESION ORAL Y ESCRITA JORGE LEONARDO VELOZA CIDBA G5
 
Sistema institucional de evaluacion y promocion
Sistema institucional de evaluacion y promocionSistema institucional de evaluacion y promocion
Sistema institucional de evaluacion y promocion
 

Mehr von Frank Sons

An Introduction to pair programming methods
An Introduction to pair programming methodsAn Introduction to pair programming methods
An Introduction to pair programming methodsFrank Sons
 
Introduction to architecture katas
Introduction to architecture katasIntroduction to architecture katas
Introduction to architecture katasFrank Sons
 
Pair programming
Pair programmingPair programming
Pair programmingFrank Sons
 
Effective Code Reviews (IPC 2018)
Effective Code Reviews (IPC 2018)Effective Code Reviews (IPC 2018)
Effective Code Reviews (IPC 2018)Frank Sons
 
Architecture Katas - How can we learn to create better architectures?
Architecture Katas - How can we learn to create better architectures?Architecture Katas - How can we learn to create better architectures?
Architecture Katas - How can we learn to create better architectures?Frank Sons
 
Effektive Code Reviews Solutions
Effektive Code Reviews SolutionsEffektive Code Reviews Solutions
Effektive Code Reviews SolutionsFrank Sons
 
Creating a good architecture
Creating a good architectureCreating a good architecture
Creating a good architectureFrank Sons
 
Effective Code Reviews
Effective Code ReviewsEffective Code Reviews
Effective Code ReviewsFrank Sons
 
"Effektive Code Reviews" - Abendvortrag bei oose.de
"Effektive Code Reviews" - Abendvortrag bei oose.de"Effektive Code Reviews" - Abendvortrag bei oose.de
"Effektive Code Reviews" - Abendvortrag bei oose.deFrank Sons
 
Code Qualität in agilen Teams - code.talks Hamburg 2015
Code Qualität in agilen Teams - code.talks Hamburg 2015Code Qualität in agilen Teams - code.talks Hamburg 2015
Code Qualität in agilen Teams - code.talks Hamburg 2015Frank Sons
 
Imposter Syndrom - Lightning talk PHP Unconference 2015
Imposter Syndrom - Lightning talk PHP Unconference 2015Imposter Syndrom - Lightning talk PHP Unconference 2015
Imposter Syndrom - Lightning talk PHP Unconference 2015Frank Sons
 
Code Quality in an agile world - PHP Usergroup Hamburg
Code Quality in an agile world - PHP Usergroup HamburgCode Quality in an agile world - PHP Usergroup Hamburg
Code Quality in an agile world - PHP Usergroup HamburgFrank Sons
 
Code Qualität in agilen Teams - Webmontag Hamburg
Code Qualität in agilen Teams - Webmontag HamburgCode Qualität in agilen Teams - Webmontag Hamburg
Code Qualität in agilen Teams - Webmontag HamburgFrank Sons
 
Was bringen Code Reviews wirklich? Wir sind doch schon agil.
Was bringen Code Reviews wirklich? Wir sind doch schon agil.Was bringen Code Reviews wirklich? Wir sind doch schon agil.
Was bringen Code Reviews wirklich? Wir sind doch schon agil.Frank Sons
 
Presenting to win - how I changed some old slides
Presenting to win - how I changed some old slidesPresenting to win - how I changed some old slides
Presenting to win - how I changed some old slidesFrank Sons
 
Selbstmotivation - vom Intro zum Extro
Selbstmotivation - vom Intro zum ExtroSelbstmotivation - vom Intro zum Extro
Selbstmotivation - vom Intro zum ExtroFrank Sons
 
Code Reviews - developer conference 2013
Code Reviews - developer conference 2013Code Reviews - developer conference 2013
Code Reviews - developer conference 2013Frank Sons
 
Code Reviews - PHP Unconference Europe 2013
Code Reviews - PHP Unconference Europe 2013Code Reviews - PHP Unconference Europe 2013
Code Reviews - PHP Unconference Europe 2013Frank Sons
 

Mehr von Frank Sons (20)

An Introduction to pair programming methods
An Introduction to pair programming methodsAn Introduction to pair programming methods
An Introduction to pair programming methods
 
Introduction to architecture katas
Introduction to architecture katasIntroduction to architecture katas
Introduction to architecture katas
 
Pair programming
Pair programmingPair programming
Pair programming
 
Effective Code Reviews (IPC 2018)
Effective Code Reviews (IPC 2018)Effective Code Reviews (IPC 2018)
Effective Code Reviews (IPC 2018)
 
Architecture Katas - How can we learn to create better architectures?
Architecture Katas - How can we learn to create better architectures?Architecture Katas - How can we learn to create better architectures?
Architecture Katas - How can we learn to create better architectures?
 
Effektive Code Reviews Solutions
Effektive Code Reviews SolutionsEffektive Code Reviews Solutions
Effektive Code Reviews Solutions
 
Creating a good architecture
Creating a good architectureCreating a good architecture
Creating a good architecture
 
Effective Code Reviews
Effective Code ReviewsEffective Code Reviews
Effective Code Reviews
 
"Effektive Code Reviews" - Abendvortrag bei oose.de
"Effektive Code Reviews" - Abendvortrag bei oose.de"Effektive Code Reviews" - Abendvortrag bei oose.de
"Effektive Code Reviews" - Abendvortrag bei oose.de
 
Code Qualität in agilen Teams - code.talks Hamburg 2015
Code Qualität in agilen Teams - code.talks Hamburg 2015Code Qualität in agilen Teams - code.talks Hamburg 2015
Code Qualität in agilen Teams - code.talks Hamburg 2015
 
Imposter Syndrom - Lightning talk PHP Unconference 2015
Imposter Syndrom - Lightning talk PHP Unconference 2015Imposter Syndrom - Lightning talk PHP Unconference 2015
Imposter Syndrom - Lightning talk PHP Unconference 2015
 
Code Quality in an agile world - PHP Usergroup Hamburg
Code Quality in an agile world - PHP Usergroup HamburgCode Quality in an agile world - PHP Usergroup Hamburg
Code Quality in an agile world - PHP Usergroup Hamburg
 
Code Qualität in agilen Teams - Webmontag Hamburg
Code Qualität in agilen Teams - Webmontag HamburgCode Qualität in agilen Teams - Webmontag Hamburg
Code Qualität in agilen Teams - Webmontag Hamburg
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Was bringen Code Reviews wirklich? Wir sind doch schon agil.
Was bringen Code Reviews wirklich? Wir sind doch schon agil.Was bringen Code Reviews wirklich? Wir sind doch schon agil.
Was bringen Code Reviews wirklich? Wir sind doch schon agil.
 
Code Review
Code ReviewCode Review
Code Review
 
Presenting to win - how I changed some old slides
Presenting to win - how I changed some old slidesPresenting to win - how I changed some old slides
Presenting to win - how I changed some old slides
 
Selbstmotivation - vom Intro zum Extro
Selbstmotivation - vom Intro zum ExtroSelbstmotivation - vom Intro zum Extro
Selbstmotivation - vom Intro zum Extro
 
Code Reviews - developer conference 2013
Code Reviews - developer conference 2013Code Reviews - developer conference 2013
Code Reviews - developer conference 2013
 
Code Reviews - PHP Unconference Europe 2013
Code Reviews - PHP Unconference Europe 2013Code Reviews - PHP Unconference Europe 2013
Code Reviews - PHP Unconference Europe 2013
 

Unit Testing: Workshop Erfahrungen

Hinweis der Redaktion

  1. Präsentationen helfen nicht (immer) BankAccount Beispiel
  2. Realität sieht anders aus Legacy Code
  3. Ja nicht wackeln, sonst bricht alles zusammen: deshalb braucht man Tests… Refactoring ohne tests: „never touch a running system“ Refactoring mit tests: „refactor mercilessly“ (Kent Beck) Teufelskreis, also was tun?
  4. Code geben lassen Dependencies machen Code untestbar Notwendiges refactoring für testbaren code Stolpersteine = advanced unit testing mock/stubs DataProvider
  5. Pair programming = laut denken! Refactoring machen lassen Warten bis Fehler erkannt werden Neue Konzepte erklären (Warum und Wie)