Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testing von TYPO3-Extensions
Search
Oliver Klee
October 13, 2024
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testing von TYPO3-Extensions
Oliver Klee
October 13, 2024
More Decks by Oliver Klee
See All by Oliver Klee
Generative KI, Ethik und Nachhaltigkeit
oliverklee
0
100
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
130
Team-Management-Plattform
oliverklee
0
98
Vertrauen in Teams & Führung
oliverklee
0
330
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
62
Vertrauen in Teams & Führung
oliverklee
0
190
Software-Qualität von Extensions automatisieren
oliverklee
1
67
Content-Synchronisierung
oliverklee
0
200
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
400
Other Decks in Programming
See All in Programming
wkhtmltopdfの次どうするか問題2026
willnet
2
1.6k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
390
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
180
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
310
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
160
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
180
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
360
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
4
12k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.3k
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
570
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.9k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
How to make the Groovebox
asonas
2
2.5k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Being A Developer After 40
akosma
91
590k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
480
Docker and Python
trallard
47
4.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Making Projects Easy
brettharned
120
6.8k
GraphQLとの向き合い方2022年版
quramy
50
15k
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