![Page 1: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/1.jpg)
codecentric AG
David Völkel – Frankfurter Entwicklertag – 19.02.2014
INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?
![Page 2: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/2.jpg)
codecentric AG
DAVID VÖLKEL
2
IT-Consultant
Schwerpunkte
Test-Driven Development
Softwaredesign & Clean Code
Software Craftsman @softwerkskammer
Twitter: @davidvoelkel
![Page 3: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/3.jpg)
codecentric AG
WIE INTEGRATIV TESTEN?
3
Integrative Tests Isolierte Tests
TEUER REALITÄTSFERN
![Page 4: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/4.jpg)
codecentric AG
Isoliert vs. integriert
Testpyramide
Test Dekomposition
Fazit
Diskussion
AGENDA
![Page 5: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/5.jpg)
codecentric AG
Senken von Risiken
Testauswahl
• 20% der Tests 80% Nutzen
• Zahl, Art, Integrationsgrad
• Risiko?
• Domäne: Prototyp bis sicherheitskritisch
• Verteilung in App
$(Tests) = Nutzen - Kosten
QUALITÄTSLEVEL?
Tests an Risiken ausrichten!
![Page 6: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/6.jpg)
codecentric AG
Isolierende
Tests
Integrierende
Tests
Feedback schnell langsam
Fehlerfindung einfach schwer
Fragilität gering hoch
Kosten (inkl. Wartung) billig teuer
Aussagekraft Nutzer gering hoch
ISOLIERT ODER INTEGRIERT?
6
http://www.jeasyui.com/tutorial/app/crud.php
![Page 7: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/7.jpg)
codecentric AG
Isolierende
Tests
Integrierende
Tests
Stärken Logik, Komplexität,
Breite
Integration,
Datenflüsse, Tiefe
Beispiel Domäne REPL CRUD
TESTOBJEKT?
7
http://www.jeasyui.com/tutorial/app/crud.php
http://tryclj.com/
![Page 8: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/8.jpg)
codecentric AG
.
LÖSUNG: TESTPYRAMIDE
8
UI
Service
Unit Inte
gra
tionsgra
d
Inte
gra
tive
Tests
effektive Teststrategie
Unit-Tests &
Pyramide nach Martin Fowler
![Page 9: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/9.jpg)
codecentric AG 9
INTERPRETATIONEN
UI
Service
Unit Unit
"Integrated Tests Are a Scam"
• J.B. Rainsberger
ATDD E2E
• z.B. GOOS, Continuous Delivery
![Page 10: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/10.jpg)
codecentric AG
Problem überladene Integrationstests
Vermischung Verantwortlichkeiten
Integration
Logik (ggf. auch verschiedene)
TEST DEKOMPOSITION
![Page 11: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/11.jpg)
codecentric AG
„SRP für Tests“
Deduplizierung von Testfalllogik
TEST DEKOMPOSITION
![Page 12: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/12.jpg)
codecentric AG
integrativer Webtest
Unittest
BEISPIEL EMAIL-VALIDIERUNG
Eingabe Ausgabe
„[email protected]“ „Email OK“
„mail.ohne@tld“ „Email ungültig“
„mail.ohne.at.de“ „Email ungültig“
„@ohne-user.de“ „Email ungültig“
…
GUI.render(email)
Validator.validiationMesssage(email)
![Page 13: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/13.jpg)
codecentric AG
FACHLICHE DIMENSION
Akzeptanztests vs. fachlich
Entwicklertests technisch
![Page 14: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/14.jpg)
codecentric AG
THE TESTING ICEBERG
Akzeptanztests
Entwicklertests
Inte
gra
tio
nsg
rad
Inspiriert durch "the testing iceberg“ von Seb Rose / Matt Wynne
UI
Service
Unit
![Page 15: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/15.jpg)
codecentric AG
UI
Service
Unit
TEST-PYRAMIDE FÜR AKZEPTANZTEST
![Page 16: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/16.jpg)
codecentric AG
Rule
Workflow
Technisches
Scripting
GUI-TEST-LAYERING S
tab
ilitä
t &
Kla
rhe
it
Gojko Adzics "UI testing without shooting yourself in the foot"
![Page 17: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/17.jpg)
codecentric AG
Rule
Workflow
Technisches
Scripting
RULE-TESTS GEGEN UI?
Gojko Adzics "UI testing without shooting yourself in the foot"
?
![Page 18: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/18.jpg)
codecentric AG
Rule
Workflow
Technisches
Scripting
ISOLIERTE GUI TESTS?
Verbleibende UI-Workflowtests
=> isolierte UI-Tests
Subcutanuous Tests
Backend-Mocking
Fat Client
Client-Side Javascript + REST
![Page 19: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/19.jpg)
codecentric AG
FAZIT
Test Pyramide
• Orthogonal & spitz
• Integrative Tests: Integration, Tiefe, einen je Integrationspunkt
• Isolierte Tests: Logik, Komplexität, Breite
• Beschaffenheit d. Applikation
• Art & Risiken
Test Dekomposition
• Integrative Tests dekomponieren
• Rules-Tests raus aus UI
• Isolierte UI-Tests möglich?
![Page 20: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/20.jpg)
codecentric AG
QUELLEN
• Bücher
• "Continuous Delivery" - Jez Humble, Dave Farley
• "Growing Object-Oriented Software, Guided by Tests" - Steve
Freeman, Nat Pryce
• "Specification by Example" - Gojko Adzic
• GOOS Mailingliste
• https://groups.google.com/forum/#!forum/growing-object-
oriented-software
• "Integrated Tests are a scam" - J.B. Rainsberger
• http://www.jbrains.ca/permalink/using-integration-tests-
mindfully-a-case-study
• http://www.jbrains.ca/permalink/integrated-tests-are-a-scam-
part-1
• "The Testing Iceberg" - Matt Whyne und Seb Rose
• http://claysnow.co.uk/the-testing-iceberg/
![Page 21: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/21.jpg)
codecentric AG
QUELLEN
• End-to-end Tests?
• http://www.higherorderlogic.com/2010/01/responding-to-brian-
marick
• Testing-Pyramide im Kontext Continuous Delivery, James Crisp
• http://jamescrisp.org/2011/05/30/automated-testing-and-the-
test-pyramid/
• Wartbare Akzeptanztests, Jez Humble
• http://de.slideshare.net/jezhumble/creating-maintainable-
automated-acceptance-tests
• http://skillsmatter.com/podcast/agile-testing/the-long-term-value-
of-acceptance-tests
• „The Three Amigos“, George Dinwiddie
• http://www.nxtbook.com/nxtbooks/sqe/bettersoftware_1111/#/19
![Page 22: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/22.jpg)
codecentric AG
FRAGEN UND DISKUSSION
22
http://commons.wikimedia.org/wiki/File:Orange_question_mark.svg?uselang=de
![Page 23: INTEGRATION TEST HELL - Entwicklertag · codecentric AG David Völkel – Frankfurter Entwicklertag – 19.02.2014 INTEGRATION TEST HELL ODER WIE INTEGRATIV SOLL ICH TESTEN?](https://reader033.vdocuments.mx/reader033/viewer/2022051922/600f879a5e7e77253677cc5f/html5/thumbnails/23.jpg)
codecentric AG
Attribution-ShareAlike 3.0 Germany
http://creativecommons.org/licenses/by-sa/3.0/de/
LIZENZ
23