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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
88
Team-Management-Plattform
oliverklee
0
72
Vertrauen in Teams & Führung
oliverklee
0
260
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
44
Vertrauen in Teams & Führung
oliverklee
0
160
Testing von TYPO3-Extensions
oliverklee
0
86
Software-Qualität von Extensions automatisieren
oliverklee
1
55
Content-Synchronisierung
oliverklee
0
170
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
330
Other Decks in Programming
See All in Programming
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
MUSUBIXとは
nahisaho
0
130
Implementation Patterns
denyspoltorak
0
280
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
CSC307 Lecture 06
javiergs
PRO
0
680
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
CSC307 Lecture 09
javiergs
PRO
1
830
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
Music & Morning Musume
bryan
47
7.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
51
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Automating Front-end Workflow
addyosmani
1371
200k
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