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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jakub Zalas
May 27, 2023
Technology
0
240
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
240
Your tests are mocking you
jakzal
0
210
Statyczna analiza aplikacji Symfony
jakzal
2
350
Symfony 4 (Flex included)
jakzal
5
470
Lightning fast tests at Dutch PHP Conference
jakzal
3
600
Eating spaghetti with Symfony
jakzal
13
4.5k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.5k
Embracing change
jakzal
5
1.2k
Other Decks in Technology
See All in Technology
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
770
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
200
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
170
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
170
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
0
160
20260204_Midosuji_Tech
takuyay0ne
1
160
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
230
SchooでVue.js/Nuxtを技術選定している理由
yamanoku
3
210
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
410
Greatest Disaster Hits in Web Performance
guaca
0
290
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
130
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.5k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
How to train your dragon (web standard)
notwaldorf
97
6.5k
Leo the Paperboy
mayatellez
4
1.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
WCS-LA-2024
lcolladotor
0
450
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
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