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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Oliver Klee
September 12, 2017
Technology
0
180
Test-driven-Development mit TYPO3
Oliver Klee
September 12, 2017
Tweet
Share
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
98
Team-Management-Plattform
oliverklee
0
73
Vertrauen in Teams & Führung
oliverklee
0
290
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
50
Vertrauen in Teams & Führung
oliverklee
0
160
Testing von TYPO3-Extensions
oliverklee
0
89
Software-Qualität von Extensions automatisieren
oliverklee
1
58
Content-Synchronisierung
oliverklee
0
170
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
340
Other Decks in Technology
See All in Technology
【Oracle Cloud ウェビナー】【入門編】はじめてのOracle AI Data Platform - AIのためのデータ準備&自社用AIエージェントをワンストップで実現
oracle4engineer
PRO
1
170
Go 1.26 Genericsにおける再帰的型制約 / Recursive Type Constraints in Go 1.26 Generics
ryokotmng
0
130
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
840
Cortex Code CLI と一緒に進めるAgentic Data Engineering
__allllllllez__
0
440
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
180
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
1
400
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
510
ReactのdangerouslySetInnerHTMLは“dangerously”だから危険 / Security.any #09 卒業したいセキュリティLT
flatt_security
0
320
VLAモデル構築のための AIロボット向け模倣学習キット
kmatsuiugo
0
260
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
280
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
400
Zeal of the Convert: Taming Shai-Hulud with AI
ramimac
0
150
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
250
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
310
It's Worth the Effort
3n
188
29k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Between Models and Reality
mayunak
2
240
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Done Done
chrislema
186
16k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
エンジニアに許された特別な時間の終わり
watany
106
240k
What's in a price? How to price your products and services
michaelherold
247
13k
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