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
150
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
Tweet
Share
More Decks by Jakub Zalas
See All by Jakub Zalas
Your tests are mocking you
jakzal
0
110
Statyczna analiza aplikacji Symfony
jakzal
2
250
Symfony 4 (Flex included)
jakzal
5
410
Lightning fast tests at Dutch PHP Conference
jakzal
3
500
Eating spaghetti with Symfony
jakzal
13
4.1k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.4k
Embracing change
jakzal
5
1.1k
The Dependency Trap
jakzal
12
1.5k
Other Decks in Technology
See All in Technology
ビジネスとコード品質の接合点 そしてコード品質がそこに及ぼす影響 / The Intersections of Business and Engineering, and The Impact of Code Quality There
mtx2s
11
1k
継続的テストモデルを実現するためにスリーアミーゴスを用いた10Xでのシフトレフトの事例
nihonbuson
3
250
Vos logs méritent mieux que la config par défaut
lyrixx
2
400
どう買う?Azure
kuniteru
1
190
Kubeflow Pipelines v2 で変わる機械学習パイプライン開発
asei
4
340
20240321_生成AI時代のDevOps
kzkmaeda
2
610
技術広報として2023年度に頑張ったこと / What we did well in FY2023 as a DevRel
pauli
5
490
KubeCon EU 2024 : Knative Maintainers Session
salaboy
0
380
Elementaryを用いたデータ品質の可視化とデータ基盤の運用改善
10xinc
6
1.7k
SREsのためのSRE定着ガイド
netmarkjp
10
1.6k
初心者が行く!サーバレスWebアプリ開発の道
nagaharutogawa
0
450
暗黙知を集積するプラットフォーム : 「健常者エミュレータ事例集」の取り組み
sora32127
1
170
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
72
8.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
Typedesign – Prime Four
hannesfritz
36
2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
Faster Mobile Websites
deanohume
296
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
113
18k
Designing for Performance
lara
601
67k
Writing Fast Ruby
sferik
619
59k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
67
38k
Designing with Data
zakiwarfel
94
4.8k
Agile that works and the tools we love
rasmusluckow
323
20k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
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