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
150
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
11
Vertrauen in Teams & Führung
oliverklee
0
77
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
6
Vertrauen in Teams & Führung
oliverklee
0
74
Testing von TYPO3-Extensions
oliverklee
0
13
Software-Qualität von Extensions automatisieren
oliverklee
1
9
Content-Synchronisierung
oliverklee
0
76
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
190
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
110
Other Decks in Programming
See All in Programming
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Better Code Design in PHP
afilina
PRO
0
120
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
Featured
See All Featured
Designing for Performance
lara
604
68k
Become a Pro
speakerdeck
PRO
25
5k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Visualization
eitanlees
145
15k
What's in a price? How to price your products and services
michaelherold
243
12k
BBQ
matthewcrist
85
9.3k
Site-Speed That Sticks
csswizardry
0
23
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
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