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
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
今年60歳のおっさんCBになる
kentapapa
1
150
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
13
7.5k
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
320
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
280
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
1
490
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
200
OCI技術資料 : 証明書サービス概要
ocise
1
7.2k
仕様通り動くの先へ。Claude Codeで「使える」を検証する
gotalab555
6
2.1k
プロダクトを触って語って理解する、チーム横断バグバッシュのすすめ / 20260411 Naoki Takahashi
shift_evolve
PRO
0
110
最大のアウトプット術は問題を作ること
ryoaccount
0
300
Podcast配信で広がったアウトプットの輪~70人と音声発信してきた7年間~/outputconf_01
fortegp05
0
230
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
410
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
340
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
280
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Building an army of robots
kneath
306
46k
How to build a perfect <img>
jonoalderson
1
5.3k
GitHub's CSS Performance
jonrohan
1032
470k
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