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
Programowanie wspierane przez testy po londyńsku
Search
Jakub Zalas
May 27, 2023
Technology
0
190
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
Tweet
Share
More Decks by Jakub Zalas
See All by Jakub Zalas
Test doubles explained in Kotlin
jakzal
0
160
Your tests are mocking you
jakzal
0
170
Statyczna analiza aplikacji Symfony
jakzal
2
310
Symfony 4 (Flex included)
jakzal
5
430
Lightning fast tests at Dutch PHP Conference
jakzal
3
550
Eating spaghetti with Symfony
jakzal
13
4.4k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.4k
Embracing change
jakzal
5
1.2k
Other Decks in Technology
See All in Technology
PHPでアクターモデルを活用したSagaパターンの実践法 / php-saga-pattern-with-actor-model
ytake
0
920
コミュニティとおかねの話 / Community and Money
kgsi
0
100
30代エンジニアが考える、エンジニア生存戦略~~セキュリティを添えて~~
masakiokuda
4
1.9k
20250326_管理ツールの権限管理で改善したこと
sasata299
0
140
ソフトウェア開発現代史: なぜ日本のソフトウェア開発は「滝」なのか?製造業の成功体験とのギャップ #jassttokyo
takabow
2
840
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
180
DIってなんだか難しい? 依存という概念を「使う・使われる」 という言葉で整理しよう
akinoriakatsuka
1
740
頻繁リリース × 高品質 = 無理ゲー? いや、できます!/20250306 Shoki Hyo
shift_evolve
0
130
Reactを段階的に覗いてみる
ytaisei
2
850
株式会社アゲテク会社説明資料
mimimimimicky
0
230
【Oracle Cloud ウェビナー】VMware環境を短期間でクラウド化!ベネッセ様事例に学ぶ仮想環境クラウド移行のリアル
oracle4engineer
PRO
2
120
Oracle Cloud Infrastructure:2025年3月度サービス・アップデート
oracle4engineer
PRO
0
300
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
102
18k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
610
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Code Review Best Practice
trishagee
67
18k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
134
33k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Designing for Performance
lara
605
69k
The Cult of Friendly URLs
andyhume
78
6.3k
Gamification - CAS2011
davidbonilla
80
5.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
117
51k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Facilitating Awesome Meetings
lara
53
6.3k
Transcript
JAKUB ZALAS PO LONDYŃSKU PROGRAMOWANIE WSPIERANE PRZEZ TESTY PHP EDITION
Jakub Zalas @jakub_zalas @jakub_zalas @jakzal
- Behaviour - Veri fi cation - The chain premise
- Collaboration tests - Test doubles - Contract tests - Mocking hell PLAN
None
None
None
None
None
None
None
https://blog.thecodewhisperer.com/permalink/integrated-tests-are-a-scam Beware the Integrated Tests Scam J. B. Rainsberger /
@jbrains
None
None
None
None
None
None
None
None
None
None
VS
None
None
None
None
VS
None
None
None
None
DATA CALCULATIONS ACTIONS Grokking Simplicity Eric Normand 2021
None
None
“TEST A CHAIN BY TESTING EACH LINK” MICHAEL "GEEPAW" HILL
https://www.geepawhill.org/2018/01/16/underplayed-the-chain-premise-in-depth/
None
None
None
None
None
WE GET TO CHOOSE WHEN AND WHERE WE BREAK THE
DEPENDENCY CHAIN FOR TESTING
None
None
COLLABORATION TESTS
INDIRECT INPUT INDIRECT OUTPUT
None
None
None
None
None
None
xUnit Test Patterns Refactoring Test Code Gerard Meszaros 2007
WE HAVE DETECTED UNUSUALLY HIGH SPENDING ON YOUR CARD IN
THESE CATEGORIES: • YOU SPENT £101.19 ON FOOD • YOU SPENT £27.70 ON ENTERTAINMENT https://github.com/testdouble/contributing-tests/wiki/Unusual-Spending-Kata
SPY & STUB HAND-CRAFTED
None
A REAL OBJECT, BUT A DUMMY WOULD WORK AS WELL.
None
A SPY
A SPY
None
None
None
A STUB
A STUB
None
None
MOCK OBJECT HAND-CRAFTED
A MOCK OBJECT
A MOCK OBJECT
None
A MOCK OBJECT
STUB & MOCK OBJECT WITH A MOCKING FRAMEWORK
A STUB
A MOCK OBJECT
None
A MOCK OBJECT
CONTRACT TESTS aka "Role tests"
None
None
None
None
None
None
UnusualSpendingNotificationUseCaseTest
UnusualSpendingNotificationUseCaseTest
UnusualSpendingQueryTest UnusualSpendingQueryTest UnusualSpendingNotificationUseCaseTest
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
THANK YOU Verify behaviour Mock roles, not objects Listen to
your tests Leverage test doubles as a TDD tool @jakub_zalas @jakub_zalas @jakzal