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
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Test-driven development for TYPO3
Slides of my workshop on T3DD14
Oliver Klee
June 21, 2014
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
130
Team-Management-Plattform
oliverklee
0
93
Vertrauen in Teams & Führung
oliverklee
0
320
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
59
Vertrauen in Teams & Führung
oliverklee
0
180
Testing von TYPO3-Extensions
oliverklee
0
100
Software-Qualität von Extensions automatisieren
oliverklee
1
63
Content-Synchronisierung
oliverklee
0
190
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
390
Other Decks in Programming
See All in Programming
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
150
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
210
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
120
Google Apps Script で Ruby を動かす
kawahara
0
140
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
VibeCodingからAgenticWorkflowへ
starfish719
0
320
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
240
継続モナドとリアクティブプログラミング
yukikurage
3
690
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.5k
Cloudflare is Agents
chimame
0
150
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
620
We Are The Robots
honzajavorek
0
290
Raft: Consensus for Rubyists
vanstee
141
7.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Between Models and Reality
mayunak
4
390
Building an army of robots
kneath
306
46k
エンジニアに許された特別な時間の終わり
watany
108
250k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
4 Signs Your Business is Dying
shpigford
187
22k
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