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
Testing von TYPO3-Extensions
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Oliver Klee
October 13, 2024
Programming
95
0
Share
Testing von TYPO3-Extensions
Oliver Klee
October 13, 2024
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
110
Team-Management-Plattform
oliverklee
0
77
Vertrauen in Teams & Führung
oliverklee
0
310
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
52
Vertrauen in Teams & Führung
oliverklee
0
170
Software-Qualität von Extensions automatisieren
oliverklee
1
61
Content-Synchronisierung
oliverklee
0
180
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
370
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
210
Other Decks in Programming
See All in Programming
AI時代になぜ書くのか
mutsumix
0
260
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
230
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
4.6k
when storing skills in S3 file
watany
3
1.4k
AIと共に生きる技術選定 2026
sgash708
0
130
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
Agentic Elixir
whatyouhide
0
440
継続的な負荷検証を目指して
pyama86
1
860
Are We Really Coding 10× Faster with AI?
kohzas
0
130
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
The Less-Told Story of Socket Timeouts
coe401_
3
1k
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Discover your Explorer Soul
emna__ayadi
2
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
GitHub's CSS Performance
jonrohan
1032
470k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
290
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
400
A Tale of Four Properties
chriscoyier
163
24k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
Transcript
Testing von TYPO3-Extension Oliver Klee, 2024-10 @
[email protected]
|
[email protected]
Über mich Oliver „Oli“ Klee #bonn #workshop-teacher (seit 1999) #extension-dev
(seit 2005) #unit-testing-guy (seit 2008) #phpstan-guy #best-practices-team #game-cooking #metal
Workshops mit mir Extension-Entwicklung Test-driven-Development TYPO3-Extensions testen QA-Automatisierung Git &
Composer Refactoring
Unit- Tests?
Manuelles Testen ist mühsam
Automatisierte Tests sind schnell
Tests für den TYPO3-Core
Unit-Tests 406 (144) Tests/s
Functional-Tests 8,13 (1,97) Tests/s
Acceptance-Tests 0,009 (0,003) Tests/s
Sicher sein, dass der Code das Richtige tut
Verhindern, dass deine Änderungen etwas anderes kaputt machen
Verhindern, dass andere Leute deinen Code kaputtmachen
Auch bei komplexen Projekten nichts kaputt machen
Baue ein Sicherheitsnetz fürs Refactoring oder für TYPO3-Updates
Verbessere die Struktur des Codes
Finde die Ursache von Bugs
Grün fühlt sich gut an!
Lasst uns ein paar Begriffe klarstellen
Die zwei Programmier-Modi sauber hacky
Testsuite Testcase Test Assertion Test Test Testcase
Lebenszyklus eines Tests new FooTest(); setUp(); /** @test */ lifeIsGood();
tearDown();
4 Test-Phasen Setup (aufbauen) setUp() Code in der Testmethode Exercise
(ausführen) Methodenaufruf Verify (prüfen) assert…() Teardown (abbauen) tearDown()
Test-driven-Development Test schreiben Code schreiben refactoren
Auswirkungen von TDD höhere Testabdeckung minimaler Code erst denken,
dann coden Tests testen, was der Code tun soll (anstatt, was er tut) fokussierter coden sauberere Code-Struktur
Test-Level http:// fi lipdefar.com/2015/06/tested-be-thy-name.html
Unit-Tests sind klein und schnell
Integrationstests testen das Zusammenspiel von Komponenten in TYPO3: „Functional
Tests“
Systemtests testen das große Ganze
Test-Typen
Blackbox-Tests testen das nach außen Sichtbare
Whitebox-Tests wie genau es innen funktioniert testen,
Akzeptanztests Selenium Codeception
Anti- Zombie- Tests-
Regressionstests
Smoketests
Smoketests
Story-Tests für Behavior-Driven Developmen t (BDD) Behat Codeception
Die Test-Pyramide Unit Functional/ Integration Acceptance System Photo by Eugene
Tkachenko on Unsplash: https://unsplash.com/photos/TF47p5PHW18
Tests benennen
Benutze aussagekräftige Test-Namen classCanBeInstantiated setTitleSetsTitle setSizeWithZeroThrowsException hasTitleForEmptyTitleReturnsFalse Benenne das Verhalten.
Nenne die Vorbedingungen. Nenne die Methode. Benutze nicht „works“ oder „correctly“. measureFrubbleWorksCorrectly