Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Test-driven-Development mit TYPO3
Search
Oliver Klee
September 12, 2017
Technology
0
150
Test-driven-Development mit TYPO3
Oliver Klee
September 12, 2017
Tweet
Share
More Decks by Oliver Klee
See All by Oliver Klee
Content-Synchronisierung
oliverklee
0
20
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
62
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
83
Test-driven development with PHPUnit
oliverklee
0
170
Writing PHPUnit tests for TYPO3 extensions
oliverklee
0
140
Software quality for TYPO3 projects: A story of cheese, games and tools
oliverklee
0
220
TDD für Senior-Devs
oliverklee
0
63
Gamification für Arbeit in Communities
oliverklee
0
110
Software quality, cheese and games
oliverklee
0
300
Other Decks in Technology
See All in Technology
エンジニア候補者向け資料2024.04.24.pdf
macloud
0
3.3k
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
200
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
200
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
4
920
反実仮想機械学習とは何か
usaito
PRO
11
4.6k
APIファーストなプロダクトマネジメントの実践 〜SaaSus Platformでの例〜 / "Practicing API-First Product Management - An Example with SaaSus Platform
oztick139
0
100
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
670
ゼロから始めるVue.jsコミュニティ貢献 / first-vuejs-community-contribution-link-and-motivation
lmi
1
130
ChatworkのSRE部って実は 半分くらいPlatform Engineering部かもしれない
saramune
0
160
Building Dashboards as a Hobby
egmc
0
200
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
Databricks における 『MLOps』
databricksjapan
2
170
Featured
See All Featured
Done Done
chrislema
178
15k
How STYLIGHT went responsive
nonsquared
92
4.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
A better future with KSS
kneath
231
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
Atom: Resistance is Futile
akmur
259
25k
Typedesign – Prime Four
hannesfritz
36
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Scaling GitHub
holman
457
140k
Transcript
Test-driven- Development mit TYPO3 Oliver Klee, 2017-09 @oliklee
[email protected]
Unit- Tests?
Manuelles Testen ist mühsam
Automatisierte Tests sind schnell
Unit-Tests für die Realty-Manager- TYPO3-Extension
>1600 Tests
< 60 Sekunden
Sicher sein, dass der Code das Richtige tut
Verhindern, dass deine Änderungen etwas anderes kaputt machen
Verhindern, dass andere Leute deinen Code kaputtmachen
Auch bei komplexen Projekten nichts kaputt machen
Baue ein Sicherheitsnetz fürs Refactoring oder für TYPO3-Updates
Verbessere die Struktur des Codes
Grün fühlt sich gut an!
None
Lasst uns ein paar Begriffe klarstellen
Die zwei Programmier-Modi sauber hacky
Testsuite Testcase Test Assertion Test Test Testcase
Lebenszyklus eines Tests new FooTest(); setUp(); /** @test */ lifeIsGood();
tearDown();
4 Test-Phasen Setup (aufbauen) setUp() Code in der Testmethode Exercise
(ausführen) Methodenaufruf Verify (prüfen) assert…() Teardown (abbauen) tearDown()
Schreibe zuerst den Test Test schreiben Code schreiben refactoren
None
Test-Level http://filipdefar.com/2015/06/tested-be-thy-name.html
Unit-Tests sind klein und schnell
Integrationstests testen das Zusammenspiel von Komponenten in TYPO3: „Functional Tests“
Systemtests testen das große Ganze
Test-Typen
Blackbox-Tests testen das nach außen Sichtbare
Whitebox-Tests wie genau es innen funktioniert testen,
Functional Tests
Akzeptanztests
Anti- Zombie- Tests-
Regressionstests
Smoketests
Smoketests
Story-Tests für Behavior-Driven Development (BDD)
None
Test- Namen
Benutze aussagekräftige Test-Namen classCanBeInstantiated setTitleSetsTitle setSizeWithZeroThrowsException hasTitleForEmptyTitleReturnsFalse Benenne das Verhalten.
Nenne die Vorbedingungen. Nenne die Methode. Benutze nicht „works“ oder „correctly“. measureFrubbleWorksCorrectly
None
Code- Kata
None
Kenne Werkzeuge deine
TYPO3-Testing-Frameworks TYPO3 CMS PHPUnit PHP Fokus typo3/ testing- framework 8.5.x-9.x
6.2.x 7.0.x-7.1.x Core (Extensions) nimut/ testing- framework 6.2.x-8.7.x (6.2.x-9.x) 4.8.x-5.7.x 5.3.x-7.1.x Extensions