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
160
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
40
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
130
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
94
Test-driven development with PHPUnit
oliverklee
0
190
Writing PHPUnit tests for TYPO3 extensions
oliverklee
0
180
Software quality for TYPO3 projects: A story of cheese, games and tools
oliverklee
0
260
TDD für Senior-Devs
oliverklee
0
72
Gamification für Arbeit in Communities
oliverklee
0
110
Software quality, cheese and games
oliverklee
0
340
Other Decks in Technology
See All in Technology
ACRiルーム最新情報とAMD GPUサーバーのご紹介
anjn
0
150
Scaling Technical Excellence at 104: Evolution in AWS and Developer Empowerment
scotthsieh825
1
150
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
初中級者用如何使用backlog -VALE TUDOEDITION-
in0u
0
140
MySQLのロックの種類とその競合
yoku0825
6
1.6k
CTOから見た事業開発とプロダクト開発 / My Perspective on Business and Product Development as CTO
keisuke69
4
960
AIアシスタントの活用で品質の向上と開発ワークフローのスピードアップ
nagix
1
200
Classmethod流のPlatform Engineering / classmethod-platform-engineering-devio2024
tomoki10
0
470
推薦システムを本番導入する上で一番優先すべきだったこと~NewsPicks記事推薦機能の改善事例を元に~
morinota
0
120
たくさん本を読んだけど 1年後には綺麗サッパリ!を乗り越えて 学習の鬼になるぞ👹
yum3
0
160
Luupの開発組織におけるインシデントマネジメントの変遷 ver.RoadtoSRENEXT2024
grimoh
1
270
AWSで”最小権限の原則”を実現するための考え方 /20240722-ssmjp-aws-least-privilege
opelab
10
4.3k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
35
4.4k
Statistics for Hackers
jakevdp
792
220k
Done Done
chrislema
179
15k
Teambox: Starting and Learning
jrom
130
8.6k
Optimizing for Happiness
mojombo
373
69k
Git: the NoSQL Database
bkeepers
PRO
423
64k
Building a Modern Day E-commerce SEO Strategy
aleyda
25
6.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
12
3.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
Testing 201, or: Great Expectations
jmmastey
33
6.9k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
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