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 for TYPO3
Search
Oliver Klee
June 21, 2014
Programming
0
160
Test-driven development for TYPO3
Slides of my workshop on T3DD14
Oliver Klee
June 21, 2014
Tweet
Share
More Decks by Oliver Klee
See All by Oliver Klee
Team-Management-Plattform
oliverklee
0
41
Vertrauen in Teams & Führung
oliverklee
0
190
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
20
Vertrauen in Teams & Führung
oliverklee
0
130
Testing von TYPO3-Extensions
oliverklee
0
41
Software-Qualität von Extensions automatisieren
oliverklee
1
31
Content-Synchronisierung
oliverklee
0
130
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
260
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
160
Other Decks in Programming
See All in Programming
エンジニア向け採用ピッチ資料
inusan
0
170
ニーリーにおけるプロダクトエンジニア
nealle
0
610
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
240
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
230
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
700
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
ReadMoreTextView
fornewid
1
480
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
580
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
エラーって何種類あるの?
kajitack
5
320
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Side Projects
sachag
455
42k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing for Performance
lara
609
69k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
710
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Statistics for Hackers
jakevdp
799
220k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
How GitHub (no longer) Works
holman
314
140k
How STYLIGHT went responsive
nonsquared
100
5.6k
Raft: Consensus for Rubyists
vanstee
140
7k
Transcript
Test-Driven Development for TYPO3 Oliver Klee, 2014-06-21 @oliklee
[email protected]
Unit tests?
Manual testing is cumbersome
Automated testing is fast
Unit tests for the Realty Manager extension
more than 1600 tests
in less than 60 seconds
Verify that your code does what you expect
Make sure that your changes won‘t break anything
Keep other coders from breaking your code
Don‘t break anything even in complex projects
Create a safety net for refactoring
Improve the structure of the code
Green feels good!
None
Know your tools
The phpunit extension has it all phpunit (TYPO3 extension) PHPUnit
(Composer package) Testrunner (back-end- module) Testrunner (CLI module) Testing framework for FE & DB
Let‘s get some terms straight
Test suite Test case Test Two tests meet in a
bar ... Assertion Test Test Test case
The life cycle of a unit test new FooTest(); setUp();
/** @test */ lifeIsGood(); tearDown();
Code test-first write test write code refactor
None
Use meaningful unit test names classCanBeInstantiated setTitleSetsTitle setSizeWithZeroThrowsException hasTitleForEmptyTitleReturnsFalse Name
the behavior. Name the preconditions. Mention the method. Dont‘t use "works" or "correctly". measureFrubbleWorksCorrectly