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
250
0
Share
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
More Decks by Jakub Zalas
See All by Jakub Zalas
Test doubles explained in Kotlin
jakzal
0
260
Your tests are mocking you
jakzal
0
220
Statyczna analiza aplikacji Symfony
jakzal
2
360
Symfony 4 (Flex included)
jakzal
5
480
Lightning fast tests at Dutch PHP Conference
jakzal
3
610
Eating spaghetti with Symfony
jakzal
13
4.6k
Lightning fast Symfony tests
jakzal
1
2.3k
Embracing change at BrnoPHP
jakzal
9
2.5k
Embracing change
jakzal
5
1.2k
Other Decks in Technology
See All in Technology
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
150
チームで育てるAI自走環境_20260409
fuktig
0
710
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
5
1.8k
Microsoft Fabricで考える非構造データのAI活用
ryomaru0825
0
650
建設的な現実逃避のしかた / How to practice constructive escapism
pauli
3
180
プロダクトを触って語って理解する、チーム横断バグバッシュのすすめ / 20260411 Naoki Takahashi
shift_evolve
PRO
0
110
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
380
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
310
主催・運営として"場をつくる”というアウトプットのススメ
_mossann_t
0
110
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
190
OCI技術資料 : 証明書サービス概要
ocise
1
7.2k
Cortex Code君、今日から内製化支援担当ね。
coco_se
0
270
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Fireside Chat
paigeccino
42
3.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
So, you think you're a good person
axbom
PRO
2
2k
Leo the Paperboy
mayatellez
6
1.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Color Theory Basics | Prateek | Gurzu
gurzu
0
280
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
700
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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