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
Oliver Klee
October 13, 2024
Programming
0
77
Testing von TYPO3-Extensions
Oliver Klee
October 13, 2024
Tweet
Share
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
80
Team-Management-Plattform
oliverklee
0
65
Vertrauen in Teams & Führung
oliverklee
0
240
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
40
Vertrauen in Teams & Führung
oliverklee
0
160
Software-Qualität von Extensions automatisieren
oliverklee
1
53
Content-Synchronisierung
oliverklee
0
160
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
320
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
190
Other Decks in Programming
See All in Programming
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
290
AIコーディングエージェント(NotebookLM)
kondai24
0
240
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
600
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
410
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
TestingOsaka6_Ozono
o3
0
180
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
150
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
170
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.8k
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Scaling GitHub
holman
464
140k
Darren the Foodie - Storyboard
khoart
PRO
0
2k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Mind Mapping
helmedeiros
PRO
0
40
Are puppies a ranking factor?
jonoalderson
0
2.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
90
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
230
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