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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Oliver Klee
October 13, 2024
Programming
0
80
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
85
Team-Management-Plattform
oliverklee
0
68
Vertrauen in Teams & Führung
oliverklee
0
250
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
43
Vertrauen in Teams & Führung
oliverklee
0
160
Software-Qualität von Extensions automatisieren
oliverklee
1
54
Content-Synchronisierung
oliverklee
0
160
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
330
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
190
Other Decks in Programming
See All in Programming
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
260
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.5k
高速開発のためのコード整理術
sutetotanuki
1
320
Graviton と Nitro と私
maroon1st
0
170
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
3.9k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2k
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
780
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.7k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
130
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.2k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
140
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Between Models and Reality
mayunak
1
170
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Site-Speed That Sticks
csswizardry
13
1k
Thoughts on Productivity
jonyablonski
74
5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Skip the Path - Find Your Career Trail
mkilby
0
45
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
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