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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
250
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
110
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
410
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
360
AWS DevOps Agent x ECS on Fargate検証 / AWS DevOps Agent x ECS on Fargate
kinunori
2
240
Tebiki Engineering Team Deck
tebiki
0
24k
マネージャー視点で考えるプロダクトエンジニアの評価 / Evaluating Product Engineers from a Manager's Perspective
hiro_torii
0
190
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
270
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
440
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
22nd ACRi Webinar - 1Finity Tamura-san's slide
nao_sumikawa
0
110
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
770
Featured
See All Featured
Amusing Abliteration
ianozsvald
0
110
Art, The Web, and Tiny UX
lynnandtonic
304
21k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
230
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
77
Designing Experiences People Love
moore
144
24k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
My Coaching Mixtape
mlcsv
0
52
Between Models and Reality
mayunak
1
200
Done Done
chrislema
186
16k
Navigating Team Friction
lara
192
16k
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