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
23
Vertrauen in Teams & Führung
oliverklee
0
140
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
8
Vertrauen in Teams & Führung
oliverklee
0
92
Testing von TYPO3-Extensions
oliverklee
0
23
Software-Qualität von Extensions automatisieren
oliverklee
1
12
Content-Synchronisierung
oliverklee
0
99
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
230
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
130
Other Decks in Programming
See All in Programming
Package Traits
ikesyo
2
230
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
0
220
Immutable ActiveRecord
megane42
0
120
DMMオンラインサロンアプリのSwift化
hayatan
0
270
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
380
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
1
200
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
170
2025.01.17_Sansan × DMM.swift
riofujimon
2
670
時計仕掛けのCompose
mkeeda
1
200
Spring gRPC について / About Spring gRPC
mackey0225
0
170
Rubyでつくるパケットキャプチャツール
ydah
0
530
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
1
180
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
The Invisible Side of Design
smashingmag
299
50k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Automating Front-end Workflow
addyosmani
1367
200k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
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